From: Mohamed Ghannam Date: Wed, 3 Jan 2018 21:06:06 +0000 (+0000) Subject: RDS: null pointer dereference in rds_atomic_free_op X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5edbe3c0249f54578636b71377861d579b1781cf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 94729d9da437..634cfcb7bba6 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -877,6 +877,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;