Home | History | Annotate | Download | only in report
      1 TITLE: WARNING: suspicious RCU usage in rds_tcp_conn_alloc
      2 
      3 [  130.359031] =============================
      4 [  130.363221] WARNING: suspicious RCU usage
      5 [  130.367384] 4.15.0+ #307 Not tainted
      6 [  130.371129] -----------------------------
      7 [  130.375415] ./include/linux/rcupdate.h:302 Illegal context switch in RCU read-side critical section!
      8 [  130.384715] 
      9 [  130.384715] other info that might help us debug this:
     10 [  130.384715] 
     11 [  130.392872] 
     12 [  130.392872] rcu_scheduler_active = 2, debug_locks = 1
     13 [  130.399555] 1 lock held by syz-executor2/31597:
     14 [  130.404221]  #0:  (rcu_read_lock){....}, at: [<00000000b2f91fff>] __rds_conn_create+0xe46/0x1b50
     15 [  130.413178] 
     16 [  130.413178] stack backtrace:
     17 [  130.417685] CPU: 1 PID: 31597 Comm: syz-executor2 Not tainted 4.15.0+ #307
     18 [  130.424682] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
     19 [  130.434012] Call Trace:
     20 [  130.436584]  dump_stack+0x194/0x257
     21 [  130.440189]  ? arch_local_irq_restore+0x53/0x53
     22 [  130.444843]  lockdep_rcu_suspicious+0x123/0x170
     23 [  130.449503]  ___might_sleep+0x385/0x470
     24 [  130.453459]  ? trace_event_raw_event_sched_switch+0x810/0x810
     25 [  130.459325]  ? debug_mutex_init+0x1c/0x60
     26 [  130.463463]  ? trace_hardirqs_on_caller+0x421/0x5c0
     27 [  130.468467]  __might_sleep+0x95/0x190
     28 [  130.472247]  kmem_cache_alloc+0x2a2/0x760
     29 [  130.476372]  ? lock_acquire+0x1d5/0x580
     30 [  130.480320]  ? __rds_conn_create+0xe46/0x1b50
     31 [  130.484788]  ? SyS_membarrier+0x700/0x700
     32 [  130.488907]  ? init_timer_key+0x163/0x3f0
     33 [  130.493045]  rds_tcp_conn_alloc+0xa7/0x4e0
     34 [  130.497266]  ? rds_tcp_conn_free+0x2d0/0x2d0
     35 [  130.501649]  ? rds_cmsg_atomic+0xff0/0xff0
     36 [  130.505858]  ? __lockdep_init_map+0xe4/0x650
     37 [  130.510240]  ? rds_cmsg_atomic+0xff0/0xff0
     38 [  130.514451]  __rds_conn_create+0x112f/0x1b50
     39 [  130.518851]  ? rds_conn_drop+0xb0/0xb0
     40 [  130.522720]  ? trace_hardirqs_on_caller+0x421/0x5c0
     41 [  130.527714]  ? trace_hardirqs_on_thunk+0x1a/0x1c
     42 [  130.532446]  ? __raw_spin_lock_init+0x1c/0x100
     43 [  130.537011]  ? trace_hardirqs_on_caller+0x421/0x5c0
     44 [  130.542022]  ? __lockdep_init_map+0xe4/0x650
     45 [  130.546415]  ? lockdep_init_map+0x9/0x10
     46 [  130.550450]  ? __init_waitqueue_head+0x97/0x140
     47 [  130.555091]  ? init_wait_entry+0x1b0/0x1b0
     48 [  130.559306]  ? lockdep_init_map+0x9/0x10
     49 [  130.563347]  ? rds_message_alloc+0x28c/0x330
     50 [  130.567730]  ? rds_message_next_extension+0x210/0x210
     51 [  130.572896]  ? rds_rdma_extra_size+0x205/0x2b0
     52 [  130.577459]  ? rds_atomic_free_op+0x330/0x330
     53 [  130.581929]  ? lock_sock_nested+0x91/0x110
     54 [  130.586157]  rds_conn_create_outgoing+0x3f/0x50
     55 [  130.590815]  rds_sendmsg+0xda3/0x2390
     56 [  130.594614]  ? rds_send_drop_to+0x19d0/0x19d0
     57 [  130.599101]  ? find_held_lock+0x35/0x1d0
     58 [  130.603149]  ? sock_has_perm+0x2a4/0x420
     59 [  130.607201]  ? selinux_secmark_relabel_packet+0xc0/0xc0
     60 [  130.612542]  ? lock_downgrade+0x980/0x980
     61 [  130.616676]  ? lock_release+0xa40/0xa40
     62 [  130.620637]  ? selinux_socket_sendmsg+0x36/0x40
     63 [  130.625282]  ? security_socket_sendmsg+0x89/0xb0
     64 [  130.630020]  ? rds_send_drop_to+0x19d0/0x19d0
     65 [  130.634500]  sock_sendmsg+0xca/0x110
     66 [  130.638192]  ___sys_sendmsg+0x767/0x8b0
     67 [  130.642147]  ? copy_msghdr_from_user+0x590/0x590
     68 [  130.646882]  ? __schedule+0x8ea/0x2040
     69 [  130.650751]  ? __sched_text_start+0x8/0x8
     70 [  130.654886]  ? __fget_light+0x2b2/0x3c0
     71 [  130.658836]  ? fget_raw+0x20/0x20
     72 [  130.662267]  ? __might_sleep+0x95/0x190
     73 [  130.666241]  __sys_sendmsg+0xe5/0x210
     74 [  130.670020]  ? __sys_sendmsg+0xe5/0x210
     75 [  130.673974]  ? SyS_shutdown+0x290/0x290
     76 [  130.677950]  ? exit_to_usermode_loop+0x8c/0x2f0
     77 [  130.682606]  ? trace_event_raw_event_sys_exit+0x260/0x260
     78 [  130.688123]  SyS_sendmsg+0x2d/0x50
     79 [  130.691639]  ? __sys_sendmsg+0x210/0x210
     80 [  130.695674]  do_syscall_64+0x282/0x940
     81 [  130.699538]  ? __do_page_fault+0xc90/0xc90
     82 [  130.703756]  ? finish_task_switch+0x1e2/0x890
     83 [  130.708227]  ? finish_task_switch+0x1b9/0x890
     84 [  130.712701]  ? syscall_return_slowpath+0x550/0x550
     85 [  130.717608]  ? syscall_return_slowpath+0x2ac/0x550
     86 [  130.722516]  ? prepare_exit_to_usermode+0x350/0x350
     87 [  130.727508]  ? entry_SYSCALL_64_after_hwframe+0x36/0x9b
     88 [  130.732850]  ? trace_hardirqs_off_thunk+0x1a/0x1c
     89 [  130.737673]  entry_SYSCALL_64_after_hwframe+0x26/0x9b
     90 [  130.742835] RIP: 0033:0x4537d9
     91 [  130.745997] RSP: 002b:00007f13a9e2cc58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e
     92 [  130.753686] RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 00000000004537d9
     93 [  130.760936] RDX: 0000000000000000 RSI: 0000000020006fc8 RDI: 0000000000000013
     94 [  130.768188] RBP: 00000000000004b5 R08: 0000000000000000 R09: 0000000000000000
     95 [  130.775431] R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f6198
     96 [  130.782672] R13: 00000000ffffffff R14: 00007f13a9e2d6d4 R15: 0000000000000000
     97 [  130.789977] BUG: sleeping function called from invalid context at mm/slab.h:420
     98 [  130.797427] in_atomic(): 1, irqs_disabled(): 0, pid: 31597, name: syz-executor2
     99 [  130.804874] 1 lock held by syz-executor2/31597:
    100 [  130.809534]  #0:  (rcu_read_lock){....}, at: [<00000000b2f91fff>] __rds_conn_create+0xe46/0x1b50
    101 [  130.818487] CPU: 1 PID: 31597 Comm: syz-executor2 Not tainted 4.15.0+ #307
    102 [  130.825481] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    103 [  130.834808] Call Trace:
    104 [  130.837373]  dump_stack+0x194/0x257
    105 [  130.840983]  ? arch_local_irq_restore+0x53/0x53
    106 [  130.845634]  ? print_lock+0x9f/0xa2
    107 [  130.849245]  ? lockdep_print_held_locks+0xc4/0x130
    108 [  130.854156]  ___might_sleep+0x2b2/0x470
    109 [  130.858106]  ? trace_event_raw_event_sched_switch+0x810/0x810
    110 [  130.863960]  ? debug_mutex_init+0x1c/0x60
    111 [  130.868085]  ? trace_hardirqs_on_caller+0x421/0x5c0
    112 [  130.873084]  __might_sleep+0x95/0x190
    113 [  130.876862]  kmem_cache_alloc+0x2a2/0x760
    114 [  130.880985]  ? lock_acquire+0x1d5/0x580
    115 [  130.884932]  ? __rds_conn_create+0xe46/0x1b50
    116 [  130.889402]  ? SyS_membarrier+0x700/0x700
    117 [  130.893522]  ? init_timer_key+0x163/0x3f0
    118 [  130.897648]  rds_tcp_conn_alloc+0xa7/0x4e0
    119 [  130.901859]  ? rds_tcp_conn_free+0x2d0/0x2d0
    120 [  130.906241]  ? rds_cmsg_atomic+0xff0/0xff0
    121 [  130.910452]  ? __lockdep_init_map+0xe4/0x650
    122 [  130.914833]  ? rds_cmsg_atomic+0xff0/0xff0
    123 [  130.919046]  __rds_conn_create+0x112f/0x1b50
    124 [  130.923448]  ? rds_conn_drop+0xb0/0xb0
    125 [  130.927310]  ? trace_hardirqs_on_caller+0x421/0x5c0
    126 [  130.932300]  ? trace_hardirqs_on_thunk+0x1a/0x1c
    127 [  130.937040]  ? __raw_spin_lock_init+0x1c/0x100
    128 [  130.941615]  ? trace_hardirqs_on_caller+0x421/0x5c0
    129 [  130.946610]  ? __lockdep_init_map+0xe4/0x650
    130 [  130.950994]  ? lockdep_init_map+0x9/0x10
    131 [  130.955039]  ? __init_waitqueue_head+0x97/0x140
    132 [  130.959683]  ? init_wait_entry+0x1b0/0x1b0
    133 [  130.963893]  ? lockdep_init_map+0x9/0x10
    134 [  130.967931]  ? rds_message_alloc+0x28c/0x330
    135 [  130.972310]  ? rds_message_next_extension+0x210/0x210
    136 [  130.977474]  ? rds_rdma_extra_size+0x205/0x2b0
    137 [  130.982042]  ? rds_atomic_free_op+0x330/0x330
    138 [  130.986511]  ? lock_sock_nested+0x91/0x110
    139 [  130.990725]  rds_conn_create_outgoing+0x3f/0x50
    140 [  130.995369]  rds_sendmsg+0xda3/0x2390
    141 [  130.999177]  ? rds_send_drop_to+0x19d0/0x19d0
    142 [  131.003667]  ? find_held_lock+0x35/0x1d0
    143 [  131.007706]  ? sock_has_perm+0x2a4/0x420
    144 [  131.011744]  ? selinux_secmark_relabel_packet+0xc0/0xc0
    145 [  131.017080]  ? lock_downgrade+0x980/0x980
    146 [  131.021202]  ? lock_release+0xa40/0xa40
    147 [  131.025165]  ? selinux_socket_sendmsg+0x36/0x40
    148 [  131.029808]  ? security_socket_sendmsg+0x89/0xb0
    149 [  131.034539]  ? rds_send_drop_to+0x19d0/0x19d0
    150 [  131.039014]  sock_sendmsg+0xca/0x110
    151 [  131.042711]  ___sys_sendmsg+0x767/0x8b0
    152 [  131.046664]  ? copy_msghdr_from_user+0x590/0x590
    153 [  131.051393]  ? __schedule+0x8ea/0x2040
    154 [  131.055259]  ? __sched_text_start+0x8/0x8
    155 [  131.059387]  ? __fget_light+0x2b2/0x3c0
    156 [  131.063336]  ? fget_raw+0x20/0x20
    157 [  131.066769]  ? __might_sleep+0x95/0x190
    158 [  131.070741]  __sys_sendmsg+0xe5/0x210
    159 [  131.074516]  ? __sys_sendmsg+0xe5/0x210
    160 [  131.078466]  ? SyS_shutdown+0x290/0x290
    161 [  131.082423]  ? exit_to_usermode_loop+0x8c/0x2f0
    162 [  131.087080]  ? trace_event_raw_event_sys_exit+0x260/0x260
    163 [  131.092600]  SyS_sendmsg+0x2d/0x50
    164 [  131.096111]  ? __sys_sendmsg+0x210/0x210
    165 [  131.100146]  do_syscall_64+0x282/0x940
    166 [  131.104008]  ? __do_page_fault+0xc90/0xc90
    167 [  131.108222]  ? finish_task_switch+0x1e2/0x890
    168 [  131.112686]  ? finish_task_switch+0x1b9/0x890
    169 [  131.117156]  ? syscall_return_slowpath+0x550/0x550
    170 [  131.122057]  ? syscall_return_slowpath+0x2ac/0x550
    171 [  131.126958]  ? prepare_exit_to_usermode+0x350/0x350
    172 [  131.131950]  ? entry_SYSCALL_64_after_hwframe+0x36/0x9b
    173 [  131.137291]  ? trace_hardirqs_off_thunk+0x1a/0x1c
    174 [  131.142115]  entry_SYSCALL_64_after_hwframe+0x26/0x9b
    175 [  131.147277] RIP: 0033:0x4537d9
    176 [  131.150440] RSP: 002b:00007f13a9e2cc58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e
    177