====================================================== WARNING: possible circular locking dependency detected 4.14.0-rc3+ #72 Not tainted ------------------------------------------------------ kworker/u4:8/3464 is trying to acquire lock: ((&(&cp->cp_send_w)->work)){+.+.}, at: [] flush_work+0x99/0x8f0 kernel/workqueue.c:2883 but task is already holding lock: (k-sk_lock-AF_INET){+.+.}, at: [] lock_sock include/net/sock.h:1459 [inline] (k-sk_lock-AF_INET){+.+.}, at: [] rds_tcp_reset_callbacks+0x1dc/0x580 net/rds/tcp.c:165 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (k-sk_lock-AF_INET){+.+.}: check_prevs_add kernel/locking/lockdep.c:2020 [inline] validate_chain kernel/locking/lockdep.c:2469 [inline] __lock_acquire+0x328f/0x4620 kernel/locking/lockdep.c:3498 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 lock_sock_nested+0xc2/0x110 net/core/sock.c:2767 lock_sock include/net/sock.h:1459 [inline] do_tcp_setsockopt.isra.37+0x142/0x1fe0 net/ipv4/tcp.c:2546 tcp_setsockopt+0xb0/0xd0 net/ipv4/tcp.c:2815 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2965 kernel_setsockopt+0x100/0x1c0 net/socket.c:3376 rds_tcp_cork net/rds/tcp_send.c:43 [inline] rds_tcp_xmit_path_prepare+0xe9/0x140 net/rds/tcp_send.c:50 rds_send_xmit+0x355/0x22d0 net/rds/send.c:187 rds_send_worker+0x115/0x2a0 net/rds/threads.c:189 process_one_work+0xbfa/0x1bd0 kernel/workqueue.c:2119 worker_thread+0x223/0x1860 kernel/workqueue.c:2253 kthread+0x39c/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 -> #0 ((&(&cp->cp_send_w)->work)){+.+.}: check_prev_add+0x865/0x1520 kernel/locking/lockdep.c:1894 check_prevs_add kernel/locking/lockdep.c:2020 [inline] validate_chain kernel/locking/lockdep.c:2469 [inline] __lock_acquire+0x328f/0x4620 kernel/locking/lockdep.c:3498 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 flush_work+0xcc/0x8f0 kernel/workqueue.c:2886 __cancel_work_timer+0x30a/0x7e0 kernel/workqueue.c:2961 cancel_delayed_work_sync+0x1a/0x20 kernel/workqueue.c:3081 rds_tcp_reset_callbacks+0x1e8/0x580 net/rds/tcp.c:167 rds_tcp_accept_one+0x881/0xd70 net/rds/tcp_listen.c:186 rds_tcp_accept_worker+0x57/0x80 net/rds/tcp.c:406 process_one_work+0xbfa/0x1bd0 kernel/workqueue.c:2119 worker_thread+0x223/0x1860 kernel/workqueue.c:2253 kthread+0x39c/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(k-sk_lock-AF_INET); lock((&(&cp->cp_send_w)->work)); lock(k-sk_lock-AF_INET); lock((&(&cp->cp_send_w)->work)); *** DEADLOCK *** 4 locks held by kworker/u4:8/3464: #0: ("%s""krdsd"){+.+.}, at: [] __write_once_size include/linux/compiler.h:305 [inline] #0: ("%s""krdsd"){+.+.}, at: [] atomic64_set arch/x86/include/asm/atomic64_64.h:33 [inline] #0: ("%s""krdsd"){+.+.}, at: [] atomic_long_set include/asm-generic/atomic-long.h:56 [inline] #0: ("%s""krdsd"){+.+.}, at: [] set_work_data kernel/workqueue.c:617 [inline] #0: ("%s""krdsd"){+.+.}, at: [] set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ("%s""krdsd"){+.+.}, at: [] process_one_work+0xad4/0x1bd0 kernel/workqueue.c:2090 #1: ((&rtn->rds_tcp_accept_w)){+.+.}, at: [] process_one_work+0xb2c/0x1bd0 kernel/workqueue.c:2094 #2: (&tc->t_conn_path_lock){+.+.}, at: [] rds_tcp_accept_one+0x739/0xd70 net/rds/tcp_listen.c:178 #3: (k-sk_lock-AF_INET){+.+.}, at: [] lock_sock include/net/sock.h:1459 [inline] #3: (k-sk_lock-AF_INET){+.+.}, at: [] rds_tcp_reset_callbacks+0x1dc/0x580 net/rds/tcp.c:165 stack backtrace: CPU: 1 PID: 3464 Comm: kworker/u4:8 Not tainted 4.14.0-rc3+ #72 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: krdsd rds_tcp_accept_worker Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_circular_bug+0x503/0x710 kernel/locking/lockdep.c:1259 check_prev_add+0x865/0x1520 kernel/locking/lockdep.c:1894 check_prevs_add kernel/locking/lockdep.c:2020 [inline] validate_chain kernel/locking/lockdep.c:2469 [inline] __lock_acquire+0x328f/0x4620 kernel/locking/lockdep.c:3498 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 flush_work+0xcc/0x8f0 kernel/workqueue.c:2886 __cancel_work_timer+0x30a/0x7e0 kernel/workqueue.c:2961 cancel_delayed_work_sync+0x1a/0x20 kernel/workqueue.c:3081 rds_tcp_reset_callbacks+0x1e8/0x580 net/rds/tcp.c:167 rds_tcp_accept_one+0x881/0xd70 net/rds/tcp_listen.c:186 rds_tcp_accept_worker+0x57/0x80 net/rds/tcp.c:406 process_one_work+0xbfa/0x1bd0 kernel/workqueue.c:2119 worker_thread+0x223/0x1860 kernel/workqueue.c:2253 kthread+0x39c/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 selinux_nlmsg_perm: 2 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24413 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24430 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24603 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24603 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24701 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24721 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24755 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=24774 comm=syz-executor0 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 26627 Comm: syz-executor2 Not tainted 4.14.0-rc3+ #72 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:31 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3559 sctp_bucket_create net/sctp/socket.c:7520 [inline] sctp_get_port_local+0x9d6/0x13c0 net/sctp/socket.c:7279 sctp_get_port+0x127/0x190 net/sctp/socket.c:7328 inet_autobind+0xaa/0x180 net/ipv4/af_inet.c:181 inet_dgram_connect+0x197/0x1f0 net/ipv4/af_inet.c:539 SYSC_connect+0x20a/0x480 net/socket.c:1642 SyS_connect+0x24/0x30 net/socket.c:1623 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007fda9f842c08 EFLAGS: 00000216 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004520a9 RDX: 0000000000000010 RSI: 0000000020074ff0 RDI: 0000000000000005 RBP: 00007fda9f842a10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b6c37 R13: 00007fda9f842b48 R14: 00000000004b6c47 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 26721 Comm: syz-executor2 Not tainted 4.14.0-rc3+ #72 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:31 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc_trace+0x4b/0x750 mm/slab.c:3625 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:666 [inline] sctp_add_bind_addr+0xd8/0x460 net/sctp/bind_addr.c:159 sctp_do_bind+0x312/0x550 net/sctp/socket.c:396 sctp_autobind+0x161/0x1d0 net/sctp/socket.c:7584 __sctp_connect+0x62f/0xc80 net/sctp/socket.c:1150 sctp_connect+0xb4/0xf0 net/sctp/socket.c:4209 inet_dgram_connect+0x16b/0x1f0 net/ipv4/af_inet.c:541 SYSC_connect+0x20a/0x480 net/socket.c:1642 SyS_connect+0x24/0x30 net/socket.c:1623 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007fda9f842c08 EFLAGS: 00000216 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004520a9 RDX: 0000000000000010 RSI: 0000000020074ff0 RDI: 0000000000000005 RBP: 00007fda9f842a10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b6c37 R13: 00007fda9f842b48 R14: 00000000004b6c47 R15: 0000000000000000 CPU: 1 PID: 26732 Comm: syz-executor0 Not tainted 4.14.0-rc3+ #72 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:31 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3559 sock_alloc_inode+0x70/0x300 net/socket.c:250 alloc_inode+0x65/0x180 fs/inode.c:208 new_inode_pseudo+0x69/0x190 fs/inode.c:890 sock_alloc+0x41/0x270 net/socket.c:565 __sock_create+0x148/0x850 net/socket.c:1226 sock_create net/socket.c:1302 [inline] SYSC_socket net/socket.c:1332 [inline] SyS_socket+0xeb/0x200 net/socket.c:1312 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007f0ae54ecc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000029 RAX: ffffffffffffffda RBX: 00000000007180b0 RCX: 00000000004520a9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f0ae54eca10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b6c37 R13: 00007f0ae54ecb48 R14: 00000000004b6c47 R15: 0000000000000000 socket: no more sockets FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 26838 Comm: syz-executor5 Not tainted 4.14.0-rc3+ #72 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:31 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3723 [inline] __kmalloc+0x63/0x760 mm/slab.c:3734 kmalloc include/linux/slab.h:498 [inline] kzalloc include/linux/slab.h:666 [inline] crypto_create_tfm+0x82/0x2e0 crypto/api.c:454 crypto_alloc_tfm+0x10e/0x2f0 crypto/api.c:539 crypto_alloc_shash+0x2c/0x40 crypto/shash.c:433 sctp_listen_start net/sctp/socket.c:7344 [inline] sctp_inet_listen+0x624/0x850 net/sctp/socket.c:7432 SYSC_listen net/socket.c:1505 [inline] SyS_listen+0x1aa/0x350 net/socket.c:1491 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007f91b5bf8c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000032 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004520a9 RDX: 0000000000000000 RSI: 040000000000000c RDI: 0000000000000005 RBP: 00007f91b5bf8a10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b6c37 R13: 00007f91b5bf8b48 R14: 00000000004b6c47 R15: 0000000000000000 sctp: failed to load transform for md5: -12 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 26926 Comm: syz-executor3 Not tainted 4.14.0-rc3+ #72 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:31 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3723 [inline] __kmalloc+0x63/0x760 mm/slab.c:3734 kmalloc include/linux/slab.h:498 [inline] sock_kmalloc+0x112/0x190 net/core/sock.c:1979 ip_mc_join_group+0x30f/0x5c0 net/ipv4/igmp.c:2142 do_ip_setsockopt.isra.12+0x2859/0x3200 net/ipv4/ip_sockglue.c:1017