====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/1:2/1003 is trying to acquire lock: ffffffff90a53980 (rds_trans_sem){++++}-{4:4}, at: rds_trans_get_preferred+0x133/0x3c0 net/rds/transport.c:100 but task is already holding lock: ffff88801f6e8450 (&id_priv->handler_mutex/1){+.+.}-{4:4}, at: cma_ib_req_handler+0x2ddb/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/rtmutex_api.c:561 [inline] mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580 cma_ib_req_handler+0x2ddb/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+0x96b2/0xdfa0 drivers/infiniband/core/cm.c:3849 process_one_work kernel/workqueue.c:3495 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659 kthread+0x38b/0x470 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/rtmutex_api.c:561 [inline] mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580 rdma_destroy_id+0x1b/0x30 drivers/infiniband/core/cma.c:2124 rds_ib_laddr_check_cm net/rds/ib.c:487 [inline] rds_ib_laddr_check+0x397/0x540 net/rds/ib.c:509 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:1947 [inline] __sys_bind+0x2e9/0x410 net/socket.c:1978 __do_sys_bind net/socket.c:1983 [inline] __se_sys_bind net/socket.c:1981 [inline] __x64_sys_bind+0x7a/0x90 net/socket.c:1981 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 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+0x92/0x200 kernel/locking/rwsem.c:1574 rds_trans_get_preferred+0x133/0x3c0 net/rds/transport.c:100 __rds_conn_create+0xa29/0x2230 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+0x3443/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+0x96b2/0xdfa0 drivers/infiniband/core/cm.c:3849 process_one_work kernel/workqueue.c:3495 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659 kthread+0x38b/0x470 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:2/1003: 4, on CPU#1: #0: ffff888033289d40 ((wq_completion)ib_cm){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #0: ffff888033289d40 ((wq_completion)ib_cm){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffff888033289d40 ((wq_completion)ib_cm){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline] #0: ffff888033289d40 ((wq_completion)ib_cm){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578 #1: ffffc90006627c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #1: ffffc90006627c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffc90006627c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline] #1: ffffc90006627c40 ((work_completion)(&(&work->work)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578 #2: ffff88802d4c7450 (&id_priv->handler_mutex){+.+.}-{4:4}, at: cma_ib_req_handler+0x218b/0x50d0 drivers/infiniband/core/cma.c:2427 #3: ffff88801f6e8450 (&id_priv->handler_mutex/1){+.+.}-{4:4}, at: cma_ib_req_handler+0x2ddb/0x50d0 drivers/infiniband/core/cma.c:2450 stack backtrace: CPU: 1 UID: 0 PID: 1003 Comm: kworker/1:2 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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+0x92/0x200 kernel/locking/rwsem.c:1574 rds_trans_get_preferred+0x133/0x3c0 net/rds/transport.c:100 __rds_conn_create+0xa29/0x2230 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+0x3443/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+0x96b2/0xdfa0 drivers/infiniband/core/cm.c:3849 process_one_work kernel/workqueue.c:3495 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659 kthread+0x38b/0x470 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