diff options
author | santosh.shilimkar@oracle.com <santosh.shilimkar@oracle.com> | 2015-08-25 12:01:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-25 16:28:10 -0700 |
commit | ba54d3ced958435e1802daf992cfd44c26cd4cb7 (patch) | |
tree | fd17ad5458a395e3f80736eb5c30fff1bef6a911 /net/rds | |
parent | b8766e4ed3e9fc6b27dc3ead029cd307caa926d2 (diff) | |
download | linux-stable-ba54d3ced958435e1802daf992cfd44c26cd4cb7.tar.gz linux-stable-ba54d3ced958435e1802daf992cfd44c26cd4cb7.tar.bz2 linux-stable-ba54d3ced958435e1802daf992cfd44c26cd4cb7.zip |
RDS: fix the dangling reference to rds_ib_incoming_slab
On rds_ib_frag_slab allocation failure, ensure rds_ib_incoming_slab
is not pointing to the detsroyed memory.
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/ib_recv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index ed9b41e3b277..6bbe62060060 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c @@ -1102,9 +1102,10 @@ int rds_ib_recv_init(void) rds_ib_frag_slab = kmem_cache_create("rds_ib_frag", sizeof(struct rds_page_frag), 0, SLAB_HWCACHE_ALIGN, NULL); - if (!rds_ib_frag_slab) + if (!rds_ib_frag_slab) { kmem_cache_destroy(rds_ib_incoming_slab); - else + rds_ib_incoming_slab = NULL; + } else ret = 0; out: return ret; |