Tariq Toukan
4905bd9a42
net/page_pool: Fix inconsistent lock state warning
Fix the warning below by calling the ptr_ring_consume_bh,
which uses spin_[un]lock_bh.
[ 179.064300] ================================
[ 179.069073] WARNING: inconsistent lock state
[ 179.073846] 4.18.0-rc2+ #18 Not tainted
[ 179.078133] --------------------------------
[ 179.082907] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[ 179.089637] swapper/21/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
[ 179.095478] 00000000963d1995 (&(&r->consumer_lock)->rlock){+.?.}, at:
__page_pool_empty_ring+0x61/0x100
[ 179.105988] {SOFTIRQ-ON-W} state was registered at:
[ 179.111443] _raw_spin_lock+0x35/0x50
[ 179.115634] __page_pool_empty_ring+0x61/0x100
[ 179.120699] page_pool_destroy+0x32/0x50
[ 179.125204] mlx5e_free_rq+0x38/0xc0 [mlx5_core]
[ 179.130471] mlx5e_close_channel+0x20/0x120 [mlx5_core]
[ 179.136418] mlx5e_close_channels+0x26/0x40 [mlx5_core]
[ 179.142364] mlx5e_close_locked+0x44/0x50 [mlx5_core]
[ 179.148509] mlx5e_close+0x42/0x60 [mlx5_core]
[ 179.153936] __dev_close_many+0xb1/0x120
[ 179.158749] dev_close_many+0xa2/0x170
[ 179.163364] rollback_registered_many+0x148/0x460
[ 179.169047] rollback_registered+0x56/0x90
[ 179.174043] unregister_netdevice_queue+0x7e/0x100
[ 179.179816] unregister_netdev+0x18/0x20
[ 179.184623] mlx5e_remove+0x2a/0x50 [mlx5_core]
[ 179.190107] mlx5_remove_device+0xe5/0x110 [mlx5_core]
[ 179.196274] mlx5_unregister_interface+0x39/0x90 [mlx5_core]
[ 179.203028] cleanup+0x5/0xbfc [mlx5_core]
[ 179.208031] __x64_sys_delete_module+0x16b/0x240
[ 179.213640] do_syscall_64+0x5a/0x210
[ 179.218151] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 179.224218] irq event stamp: 334398
[ 179.228438] hardirqs last enabled at (334398): [<ffffffffa511d8b7>]
rcu_process_callbacks+0x1c7/0x790
[ 179.239178] hardirqs last disabled at (334397): [<ffffffffa511d872>]
rcu_process_callbacks+0x182/0x790
[ 179.249931] softirqs last enabled at (334386): [<ffffffffa509732e>] irq_enter+0x5e/0x70
[ 179.259306] softirqs last disabled at (334387): [<ffffffffa509741c>] irq_exit+0xdc/0xf0
[ 179.268584]
[ 179.268584] other info that might help us debug this:
[ 179.276572] Possible unsafe locking scenario:
[ 179.276572]
[ 179.283877] CPU0
[ 179.286954] ----
[ 179.290033] lock(&(&r->consumer_lock)->rlock);
[ 179.295546] <Interrupt>
[ 179.298830] lock(&(&r->consumer_lock)->rlock);
[ 179.304550]
[ 179.304550] *** DEADLOCK ***
Fixes: ff7d6b27f8 ("page_pool: refurbish version of page_pool code")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-19 23:23:01 -07:00
..
2018-07-14 11:11:09 -07:00
2018-07-02 20:34:04 +09:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-23 10:29:33 +02:00
2018-06-28 10:40:47 -07:00
2018-07-11 16:10:57 -07:00
2018-06-28 21:39:16 +09:00
2018-06-16 07:39:34 +09:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-15 07:24:58 +09:00
2018-07-19 23:23:01 -07:00
2018-06-12 16:19:22 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-07-16 11:22:14 -07:00
2018-06-11 14:19:38 -07:00
2018-05-08 00:02:36 -04:00
2018-07-05 11:13:17 +02:00
2018-04-22 21:12:00 -04:00
2018-07-18 15:26:33 -07:00
2018-07-18 15:10:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-29 09:39:08 +02:00
2018-03-28 22:55:18 +02:00
2018-03-27 13:18:09 -04:00
2018-06-20 07:26:58 +09:00
2018-07-09 18:04:11 +02:00
2018-05-14 17:24:18 -04:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-07-18 10:51:45 -07:00
2018-07-12 16:55:29 -07:00
2018-06-12 16:19:22 -07:00
2018-07-12 16:55:59 -07:00
2018-06-28 10:40:47 -07:00
2018-07-05 20:20:03 +09:00
2018-06-27 10:11:03 +09:00
2018-05-23 11:26:45 +02:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-07-18 13:44:07 -07:00
2018-07-04 21:36:34 +09:00
2018-07-18 19:32:54 -07:00
2018-06-28 21:37:26 +09:00
2018-06-22 06:21:34 +09:00
2018-07-07 19:49:02 +09:00
2018-07-16 13:31:31 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-29 09:44:51 +02:00
2018-06-28 10:40:47 -07:00
2018-07-13 15:34:31 +02:00
2018-06-06 18:39:49 -07:00
2018-04-27 19:46:06 -04:00
2018-05-28 22:59:54 -04:00
2018-06-28 13:36:39 +09:00
2018-06-29 06:51:51 -07:00
2018-03-27 13:18:09 -04:00