android_kernel_motorola_sm6375/net/rds
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tetsuo Handa 360aa72192 net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks()
[ Upstream commit a91b750fd6629354460282bbf5146c01b05c4859 ]

syzbot is reporting lockdep warning at rds_tcp_reset_callbacks() [1], for
commit ac3615e7f3 ("RDS: TCP: Reduce code duplication in
rds_tcp_reset_callbacks()") added cancel_delayed_work_sync() into a section
protected by lock_sock() without realizing that rds_send_xmit() might call
lock_sock().

We don't need to protect cancel_delayed_work_sync() using lock_sock(), for
even if rds_{send,recv}_worker() re-queued this work while __flush_work()
 from cancel_delayed_work_sync() was waiting for this work to complete,
retried rds_{send,recv}_worker() is no-op due to the absence of RDS_CONN_UP
bit.

Link: https://syzkaller.appspot.com/bug?extid=78c55c7bc6f66e53dce2 [1]
Reported-by: syzbot <syzbot+78c55c7bc6f66e53dce2@syzkaller.appspotmail.com>
Co-developed-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tested-by: syzbot <syzbot+78c55c7bc6f66e53dce2@syzkaller.appspotmail.com>
Fixes: ac3615e7f3 ("RDS: TCP: Reduce code duplication in rds_tcp_reset_callbacks()")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:22:26 +02:00
..
af_rds.c
bind.c
cong.c
connection.c rds: memory leak in __rds_conn_create() 2021-12-22 09:29:37 +01:00
ib.c
ib.h
ib_cm.c
ib_fmr.c
ib_frmr.c net/rds: dma_map_sg is entitled to merge entries 2021-09-03 10:08:15 +02:00
ib_mr.h
ib_rdma.c
ib_recv.c rds: add missing barrier to release_refill 2022-08-25 11:18:18 +02:00
ib_ring.c
ib_send.c
ib_stats.c
ib_sysctl.c
info.c
info.h
Kconfig
loop.c
loop.h
Makefile
message.c net/rds: Fix a use after free in rds_message_map_pages 2021-04-14 08:24:15 +02:00
page.c
rdma.c net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS 2021-02-17 10:35:19 +01:00
rdma_transport.c
rdma_transport.h
rds.h
rds_single_path.h
recv.c net: rds: fix memory leak in rds_recvmsg 2021-06-23 14:41:24 +02:00
send.c
stats.c
sysctl.c
tcp.c net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks() 2022-10-26 13:22:26 +02:00
tcp.h RDS tcp loopback connection can hang 2021-06-16 11:59:35 +02:00
tcp_connect.c
tcp_listen.c RDS tcp loopback connection can hang 2021-06-16 11:59:35 +02:00
tcp_recv.c
tcp_send.c
tcp_stats.c
threads.c
transport.c