On 03/18 17:35, Alexander Lobakin wrote:
> Queue management ops unconditionally enable netdev locking. The same
> lock is taken by default by several NAPI configuration functions,
> such as napi_enable() and netif_napi_set_irq().
> Request ops locking in advance and make sure we use the _locked
> counterparts of those functions to avoid deadlocks, taking the lock
> manually where needed (suspend/resume, queue rebuild and resets).

Hi Alexander,
After applying this patch (3/5) along with the preceding ones on top of
net-next, I got some WARNING splats when changing the admin state
(up/down) using the ip link command. [1, 2]

Since I haven't looked into this series in detail, I'm reporting the
splats anyway. 
I'm wondering why I haven't seen anyone report this type of issue up to
v3. Maybe there is something wrong with my setup or devices?

Device: Intel Corporation Ethernet Controller E810-XXV for SFP (rev 02)

[1] ip link set $DEV up
  WARNING: ./include/net/netdev_lock.h:17 at 
netif_napi_set_irq_locked+0x393/0x4b0, CPU#0: ip/898
  Modules linked in:
  CPU: 0 UID: 0 PID: 898 Comm: ip Not tainted 7.0.0-rc3-00751-gf0103a010a50 #88 
PREEMPT(full)
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
1.16.3-debian-1.16.3-2 04/01/2014
  RIP: 0010:netif_napi_set_irq_locked+0x393/0x4b0
  [...]
  Call Trace:
   <TASK>
   ice_vsi_set_napi_queues_locked+0x31b/0x4d0
   ice_vsi_open+0x359/0x420
   ice_open_internal+0x1a4/0x230
   __dev_open+0x2e9/0x830
   __dev_change_flags+0x411/0x610
   netif_change_flags+0x76/0x170
   do_setlink.isra.0+0x17e8/0x39a0
   rtnl_newlink+0xe72/0x22a0
   rtnetlink_rcv_msg+0x6ea/0xb40
   netlink_rcv_skb+0x121/0x380
   netlink_unicast+0x4aa/0x780
   netlink_sendmsg+0x753/0xc80
   ____sys_sendmsg+0x7a2/0x950
   ___sys_sendmsg+0xf8/0x180
   __sys_sendmsg+0x11f/0x1c0
   do_syscall_64+0xf3/0x690
   entry_SYSCALL_64_after_hwframe+0x77/0x7f
  RIP: 0033:0x7f07ffabec5e
  [...]

[2] ip link set $DEV down
  WARNING: ./include/net/netdev_lock.h:17 at napi_disable_locked+0x3dd/0x5e0, 
CPU#0: ip/921
  Modules linked in:
  CPU: 0 UID: 0 PID: 921 Comm: ip Tainted: G        W           
7.0.0-rc3-00751-gf0103a010a50 #88 PREEMPT(full)
  Tainted: [W]=WARN
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
1.16.3-debian-1.16.3-2 04/01/2014
  RIP: 0010:napi_disable_locked+0x3dd/0x5e0
  [...]
  Call Trace:
   <TASK>
   ice_down+0x7c3/0x1010
   ice_vsi_close+0x26f/0x360
   ice_stop+0xde/0x120
   __dev_close_many+0x2a2/0x650
   __dev_change_flags+0x237/0x610
   netif_change_flags+0x76/0x170
   do_setlink.isra.0+0x17e8/0x39a0
   rtnl_newlink+0xe72/0x22a0
   rtnetlink_rcv_msg+0x6ea/0xb40
   netlink_rcv_skb+0x121/0x380
   netlink_unicast+0x4aa/0x780
   netlink_sendmsg+0x753/0xc80
   ____sys_sendmsg+0x7a2/0x950
   ___sys_sendmsg+0xf8/0x180
   __sys_sendmsg+0x11f/0x1c0
   do_syscall_64+0xf3/0x690
   entry_SYSCALL_64_after_hwframe+0x77/0x7f
  RIP: 0033:0x7fc0bb17cc5e
  [...]
  ------------[ cut here ]------------
  WARNING: ./include/net/netdev_lock.h:17 at 
netif_napi_set_irq_locked+0x393/0x4b0, CPU#0: ip/921
  Modules linked in:
  CPU: 0 UID: 0 PID: 921 Comm: ip Tainted: G        W           
7.0.0-rc3-00751-gf0103a010a50 #88 PREEMPT(full)
  Tainted: [W]=WARN
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
1.16.3-debian-1.16.3-2 04/01/2014
  RIP: 0010:netif_napi_set_irq_locked+0x393/0x4b0
  [...]
  Call Trace:
   <TASK>
   ice_vsi_clear_napi_queues_locked+0xe7/0x2b0
   ice_vsi_close+0x38/0x360
   ice_stop+0xde/0x120
   __dev_close_many+0x2a2/0x650
   __dev_change_flags+0x237/0x610
   netif_change_flags+0x76/0x170
   do_setlink.isra.0+0x17e8/0x39a0
   rtnl_newlink+0xe72/0x22a0
   rtnetlink_rcv_msg+0x6ea/0xb40
   netlink_rcv_skb+0x121/0x380
   netlink_unicast+0x4aa/0x780
   netlink_sendmsg+0x753/0xc80
   ____sys_sendmsg+0x7a2/0x950
   ___sys_sendmsg+0xf8/0x180
   __sys_sendmsg+0x11f/0x1c0
   do_syscall_64+0xf3/0x690
   entry_SYSCALL_64_after_hwframe+0x77/0x7f
  RIP: 0033:0x7fc0bb17cc5e
  [...]
  ------------[ cut here ]------------
  WARNING: ./include/net/netdev_lock.h:17 at 
netif_napi_affinity_release+0x1cb/0x250, CPU#1: ip/921
  Modules linked in:
  CPU: 1 UID: 0 PID: 921 Comm: ip Tainted: G        W           
7.0.0-rc3-00751-gf0103a010a50 #88 PREEMPT(full)
  Tainted: [W]=WARN
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
1.16.3-debian-1.16.3-2 04/01/2014
  RIP: 0010:netif_napi_affinity_release+0x1cb/0x250
  [...]
  Call Trace:
   <TASK>
   irq_set_affinity_notifier+0x261/0x360
   netif_napi_set_irq_locked+0x338/0x4b0
   ice_vsi_clear_napi_queues_locked+0xe7/0x2b0
   ice_vsi_close+0x38/0x360
   ice_stop+0xde/0x120
   __dev_close_many+0x2a2/0x650
   __dev_change_flags+0x237/0x610
   netif_change_flags+0x76/0x170
   do_setlink.isra.0+0x17e8/0x39a0
   rtnl_newlink+0xe72/0x22a0
   rtnetlink_rcv_msg+0x6ea/0xb40
   netlink_rcv_skb+0x121/0x380
   netlink_unicast+0x4aa/0x780
   netlink_sendmsg+0x753/0xc80
   ____sys_sendmsg+0x7a2/0x950
   ___sys_sendmsg+0xf8/0x180
   __sys_sendmsg+0x11f/0x1c0
   do_syscall_64+0xf3/0x690
   entry_SYSCALL_64_after_hwframe+0x77/0x7f
  RIP: 0033:0x7fc0bb17cc5e
  [...]

Reply via email to