Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1392790 > unrolled thread

[PATCH 4.5 121/200] IB/core: Fix oops in ib_cache_gid_set_default_gid

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-05-03 03:10 +0200
Last post2016-05-03 03:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.5 121/200] IB/core: Fix oops in ib_cache_gid_set_default_gid Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-03 03:10 +0200

#1392790 — [PATCH 4.5 121/200] IB/core: Fix oops in ib_cache_gid_set_default_gid

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-03 03:10 +0200
Subject[PATCH 4.5 121/200] IB/core: Fix oops in ib_cache_gid_set_default_gid
Message-ID<rux0E-6wF-65@gated-at.bofh.it>
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Doug Ledford <dledford@redhat.com>

commit f4e7de63ab273b6a5e35c82eb4fc6363c855ddd4 upstream.

When we fail to find the default gid index, we can't continue
processing in this routine or else we will pass a negative
index to later routines resulting in invalid memory access
attempts and a kernel oops.

Fixes: 03db3a2d81e6 (IB/core: Add RoCE GID table management)
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/core/cache.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -691,7 +691,8 @@ void ib_cache_gid_set_default_gid(struct
 			      NULL);
 
 		/* Coudn't find default GID location */
-		WARN_ON(ix < 0);
+		if (WARN_ON(ix < 0))
+			goto release;
 
 		zattr_type.gid_type = gid_type;
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web