OSDN Git Service

RDS: null pointer dereference in rds_atomic_free_op
authorMohamed Ghannam <simo.ghannam@gmail.com>
Wed, 3 Jan 2018 21:06:06 +0000 (21:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:38:53 +0000 (09:38 +0100)
commitce31b6ac1111096ae9bb0b45f4ba564a909bb366
treeba069dc8057bcbc15f956050c06d6183e624e65b
parentcebb382931c4fb341162eae80b696650260e4a2b
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