summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorMohamed Ghannam <simo.ghannam@gmail.com>2018-01-03 21:06:06 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-17 09:38:53 +0100
commitce31b6ac1111096ae9bb0b45f4ba564a909bb366 (patch)
treeba069dc8057bcbc15f956050c06d6183e624e65b /net/rds
parentcebb382931c4fb341162eae80b696650260e4a2b (diff)
RDS: null pointer dereference in rds_atomic_free_op
[ Upstream commit 7d11f77f84b27cef452cee332f4e469503084737 ] set rm->atomic.op_active to 0 when rds_pin_pages() fails or the user supplied address is invalid, this prevents a NULL pointer usage in rds_atomic_free_op() Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/rdma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 4880f9a2d356..f6027f41cd34 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -876,6 +876,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
err:
if (page)
put_page(page);
+ rm->atomic.op_active = 0;
kfree(rm->atomic.op_notifier);
return ret;