rds: tcp: must use spin_lock_irq* and not spin_lock_bh with rds_tcp_conn_lock
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Thu, 15 Mar 2018 10:54:26 +0000 (03:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Mar 2018 21:18:54 +0000 (17:18 -0400)
commit53d0e83f9329aa51dcc205b514dbee05cb4df309
tree71b0c06bfe39f8f46320853cd8a6c7944354a34f
parent3008ba5faa7a63bac2227c56b533c08fa6d54a0b
rds: tcp: must use spin_lock_irq* and not spin_lock_bh with rds_tcp_conn_lock

rds_tcp_connection allocation/free management has the potential to be
called from __rds_conn_create after IRQs have been disabled, so
spin_[un]lock_bh cannot be used with rds_tcp_conn_lock.

Bottom-halves that need to synchronize for critical sections protected
by rds_tcp_conn_lock should instead use rds_destroy_pending() correctly.

Reported-by: syzbot+c68e51bb5e699d3f8d91@syzkaller.appspotmail.com
Fixes: ebeeb1ad9b8a ("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/tcp.c