Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor4 (pid 5572) Use of int in maxseg socket option. Use struct sctp_assoc_value instead ====================================================== WARNING: possible circular locking dependency detected 4.14.0-rc1+ #64 Not tainted ------------------------------------------------------ kworker/u4:17/6022 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:2762 lock_sock include/net/sock.h:1459 [inline] do_tcp_setsockopt.isra.35+0x142/0x1fe0 net/ipv4/tcp.c:2532 tcp_setsockopt+0xb0/0xd0 net/ipv4/tcp.c:2801 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2960 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:17/6022: #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: 6022 Comm: kworker/u4:17 Not tainted 4.14.0-rc1+ #64 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: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5609 comm=syz-executor7 nla_parse: 4 callbacks suppressed netlink: 1 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor1'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5663 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5701 comm=syz-executor7 netlink: 1 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor3'. Started in network mode Own node address <128.3766.2251>, network identity 4711 netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=7273 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=7349 comm=syz-executor7 Started in network mode Own node address <64.3188.2182>, network identity 4711 nla_parse: 95 callbacks suppressed netlink: 1 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor0'. Started in network mode Own node address <128.1230.3782>, network identity 4711 Started in network mode Own node address <172.320.1962>, network identity 4711 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 9979 Comm: syz-executor7 Not tainted 4.14.0-rc1+ #64 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_node mm/slab.c:3304 [inline] kmem_cache_alloc_node+0x56/0x760 mm/slab.c:3649 __alloc_skb+0xf1/0x740 net/core/skbuff.c:194 alloc_skb include/linux/skbuff.h:977 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1145 [inline] netlink_sendmsg+0xa86/0xe70 net/netlink/af_netlink.c:1837 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 sock_write_iter+0x320/0x5e0 net/socket.c:912 call_write_iter include/linux/fs.h:1770 [inline] do_iter_readv_writev+0x531/0x7f0 fs/read_write.c:673 do_iter_write+0x15a/0x540 fs/read_write.c:952 vfs_writev+0x18a/0x340 fs/read_write.c:997 do_writev+0xfc/0x2a0 fs/read_write.c:1032 SYSC_writev fs/read_write.c:1105 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1102 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007f69f1933c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004520a9 RDX: 0000000000000001 RSI: 0000000020b3bff0 RDI: 0000000000000005 RBP: 00007f69f1933a10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b6c37 R13: 00007f69f1933b48 R14: 00000000004b6c47 R15: 0000000000000000