Commit 7d11f77f authored by Mohamed Ghannam's avatar Mohamed Ghannam Committed by David S. Miller

RDS: null pointer dereference in rds_atomic_free_op

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: default avatarMohamed Ghannam <simo.ghannam@gmail.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dfe8266b
...@@ -877,6 +877,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, ...@@ -877,6 +877,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
err: err:
if (page) if (page)
put_page(page); put_page(page);
rm->atomic.op_active = 0;
kfree(rm->atomic.op_notifier); kfree(rm->atomic.op_notifier);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment