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: ff7d6b27f894 ("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-06-28 10:40:47 -07:00
2018-04-19 12:58:20 -04:00
2018-06-30 21:26:52 +09:00
2018-06-20 08:12:57 +09:00
2018-06-05 12:32:37 -04:00
2017-11-21 15:57:07 -08:00
2018-03-05 12:52:45 -05:00
2018-04-17 23:41:16 -04:00
2018-06-12 16:19:22 -07:00
2018-05-28 22:59:54 -04:00
2018-03-29 14:10:30 -04:00
2018-06-30 22:11:13 +09:00
2018-07-11 22:29:18 +02:00
2018-06-04 13:21:18 -04:00
2018-02-23 12:35:46 -05:00
2018-07-04 14:44:45 +09:00
2017-11-02 11:10:55 +01:00
2016-05-25 12:35:09 -07:00
2018-01-23 19:43:30 -05:00
2017-09-26 13:36:44 -07:00
2017-08-07 14:16:22 -07:00
2018-05-28 22:59:54 -04:00
2018-06-15 09:37:33 -07:00
2018-03-31 22:24:58 -04:00
2018-05-16 07:24:30 +02:00
2018-05-31 23:02:42 -04:00
2017-11-02 11:10:55 +01:00
2018-05-24 23:01:15 -04:00
2017-07-21 11:14:51 -04:00
2015-05-31 00:03:21 -07:00
2017-11-08 11:13:54 +01:00
2017-12-13 13:18:46 -05:00
2018-07-19 23:23:01 -07:00
2018-06-12 16:19:22 -07:00
2015-11-03 11:08:22 -05:00
2016-12-29 11:38:31 -05:00
2018-06-05 12:45:29 -04:00
2017-03-02 08:42:29 +01:00
2017-06-08 10:53:29 -04:00
2018-07-13 14:27:39 -07:00
2018-03-27 13:18:09 -04:00
2018-02-02 19:47:03 -05:00
2018-06-29 21:56:27 +09:00
2018-02-11 14:34:03 -08:00
2018-04-05 21:36:27 -07:00
2015-07-09 14:17:15 -07:00
2017-11-02 11:10:55 +01:00
2018-03-26 08:53:43 -06:00
2018-06-05 15:46:26 +02:00