====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/1:4/5724 is trying to acquire lock: ffffffff914a2268 (rds_trans_sem){++++}-{4:4}, at: rds_trans_get_preferred+0x133/0x3c0 net/rds/transport.c:100 but task is already holding lock: ffff888093184420 (&id_priv->handler_mutex/1){+.+.}-{4:4}, at: cma_ib_req_handler+0x2dd8/0x50d0 drivers/infiniband/core/cma.c:2450 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&id_priv->handler_mutex/1){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 cma_ib_req_handler+0x2dd8/0x50d0 drivers/infiniband/core/cma.c:2450 cm_process_work+0x51/0x420 drivers/infiniband/core/cm.c:1869 cm_req_handler drivers/infiniband/core/cm.c:2235 [inline] cm_work_handler+0x96c3/0xdff0 drivers/infiniband/core/cm.c:3849 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 (&id_priv->handler_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 rdma_destroy_id+0x1b/0x30 drivers/infiniband/core/cma.c:2124 rds_ib_laddr_check_cm net/rds/ib.c:489 [inline] rds_ib_laddr_check+0x373/0x630 net/rds/ib.c:511 rds_trans_get_preferred+0x179/0x3c0 net/rds/transport.c:104 rds_bind+0x687/0x870 net/rds/bind.c:254 __sys_bind_socket net/socket.c:1945 [inline] __sys_bind+0x2e3/0x410 net/socket.c:1976 __do_sys_bind net/socket.c:1981 [inline] __se_sys_bind net/socket.c:1979 [inline] __x64_sys_bind+0x7a/0x90 net/socket.c:1979 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (rds_trans_sem){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 down_read+0x4a/0x330 kernel/locking/rwsem.c:1574 rds_trans_get_preferred+0x133/0x3c0 net/rds/transport.c:100 __rds_conn_create+0xa2c/0x2290 net/rds/connection.c:252 rds_conn_create+0x43/0x60 net/rds/connection.c:384 rds_ib_cm_handle_connect+0x446/0x1120 net/rds/ib_cm.c:860 rds_rdma_cm_event_handler_cmn+0x691/0xa30 net/rds/rdma_transport.c:91 cma_cm_event_handler+0xac/0x2c0 drivers/infiniband/core/cma.c:2181 cma_ib_req_handler+0x3440/0x50d0 drivers/infiniband/core/cma.c:2461 cm_process_work+0x51/0x420 drivers/infiniband/core/cm.c:1869 cm_req_handler drivers/infiniband/core/cm.c:2235 [inline] cm_work_handler+0x96c3/0xdff0 drivers/infiniband/core/cm.c:3849 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Chain exists of: rds_trans_sem --> &id_priv->handler_mutex --> &id_priv->handler_mutex/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&id_priv->handler_mutex/1); lock(&id_priv->handler_mutex); lock(&id_priv->handler_mutex/1); rlock(rds_trans_sem); *** DEADLOCK *** locks held by kworker/1:4/5724: 4, last CPU#1: #0: ffff88802caa7140 ((wq_completion)ib_cm){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #0: ffff88802caa7140 ((wq_completion)ib_cm){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffff88802caa7140 ((wq_completion)ib_cm){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline] #0: ffff88802caa7140 ((wq_completion)ib_cm){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479 #1: ffffc90004317c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #1: ffffc90004317c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffc90004317c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline] #1: ffffc90004317c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479 #2: ffff888038ada420 (&id_priv->handler_mutex){+.+.}-{4:4}, at: cma_ib_req_handler+0x2188/0x50d0 drivers/infiniband/core/cma.c:2427 #3: ffff888093184420 (&id_priv->handler_mutex/1){+.+.}-{4:4}, at: cma_ib_req_handler+0x2dd8/0x50d0 drivers/infiniband/core/cma.c:2450 stack backtrace: CPU: 1 UID: 0 PID: 5724 Comm: kworker/1:4 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Workqueue: ib_cm cm_work_handler Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 down_read+0x4a/0x330 kernel/locking/rwsem.c:1574 rds_trans_get_preferred+0x133/0x3c0 net/rds/transport.c:100 __rds_conn_create+0xa2c/0x2290 net/rds/connection.c:252 rds_conn_create+0x43/0x60 net/rds/connection.c:384 rds_ib_cm_handle_connect+0x446/0x1120 net/rds/ib_cm.c:860 rds_rdma_cm_event_handler_cmn+0x691/0xa30 net/rds/rdma_transport.c:91 cma_cm_event_handler+0xac/0x2c0 drivers/infiniband/core/cma.c:2181 cma_ib_req_handler+0x3440/0x50d0 drivers/infiniband/core/cma.c:2461 cm_process_work+0x51/0x420 drivers/infiniband/core/cm.c:1869 cm_req_handler drivers/infiniband/core/cm.c:2235 [inline] cm_work_handler+0x96c3/0xdff0 drivers/infiniband/core/cm.c:3849 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245