RDS: null pointer dereference in rds_atomic_free_op
commit5edbe3c0249f54578636b71377861d579b1781cf
authorMohamed Ghannam <simo.ghannam@gmail.com>
Wed, 3 Jan 2018 21:06:06 +0000 (3 21:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:21 +0000 (17 09:45 +0100)
tree3d26e4efc37dc5fc237855941f86ff04986e5ebc
parent5d127d15ad2f9f33af788f1edf720ba29317f55b
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>
net/rds/rdma.c