]> git.baikalelectronics.ru Git - kernel.git/commit
rds: do not call ->conn_alloc with GFP_KERNEL
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Tue, 13 Feb 2018 17:46:16 +0000 (09:46 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Feb 2018 18:52:02 +0000 (13:52 -0500)
commit5c30401ec4af41d2e21e2144014ddf6956b4bbba
tree7571e6aa6e2a1025c33735300cc8dbd3c8996789
parentcded494b7ebbdbb052ac637ded1a908de3b156bf
rds: do not call ->conn_alloc with GFP_KERNEL

Commit 2dc8f143cfb7 ("rds: tcp: use rds_destroy_pending() to synchronize
netns/module teardown and rds connection/workq management")
adds an rcu read critical section to __rd_conn_create. The
memory allocations in that critcal section need to use
GFP_ATOMIC to avoid sleeping.

This patch was verified with syzkaller reproducer.

Reported-by: syzbot+a0564419941aaae3fe3c@syzkaller.appspotmail.com
Fixes: 2dc8f143cfb7 ("rds: tcp: use rds_destroy_pending() to synchronize
       netns/module teardown and rds connection/workq management")
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/connection.c