Skip to content

Commit 7d11f77

Browse files
0x36davem330
authored andcommitted
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: Mohamed Ghannam <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dfe8266 commit 7d11f77

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/rds/rdma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
877877
err:
878878
if (page)
879879
put_page(page);
880+
rm->atomic.op_active = 0;
880881
kfree(rm->atomic.op_notifier);
881882

882883
return ret;

0 commit comments

Comments
 (0)