Xin Long
bab9693a9a
net: thunderx: use spin_lock_bh in nicvf_set_rx_mode_task()
...
A dead lock was triggered on thunderx driver:
CPU0 CPU1
---- ----
[01] lock(&(&nic->rx_mode_wq_lock)->rlock);
[11] lock(&(&mc->mca_lock)->rlock);
[12] lock(&(&nic->rx_mode_wq_lock)->rlock);
[02] <Interrupt> lock(&(&mc->mca_lock)->rlock);
The path for each is:
[01] worker_thread() -> process_one_work() -> nicvf_set_rx_mode_task()
[02] mld_ifc_timer_expire()
[11] ipv6_add_dev() -> ipv6_dev_mc_inc() -> igmp6_group_added() ->
[12] dev_mc_add() -> __dev_set_rx_mode() -> nicvf_set_rx_mode()
To fix it, it needs to disable bh on [1], so that the timer on [2]
wouldn't be triggered until rx_mode_wq_lock is released. So change
to use spin_lock_bh() instead of spin_lock().
Thanks to Paolo for helping with this.
v1->v2:
- post to netdev.
Reported-by: Rafael P. <rparrazo@redhat.com >
Tested-by: Dean Nelson <dnelson@redhat.com >
Fixes: 469998c861 ("net: thunderx: prevent concurrent data re-writing by nicvf_set_rx_mode")
Signed-off-by: Xin Long <lucien.xin@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2020-08-04 13:03:36 -07:00
..
2020-06-14 01:57:21 +09:00
2020-07-03 16:15:31 +02:00
2020-06-15 23:08:28 -05:00
2020-07-23 09:47:12 +02:00
2020-06-19 13:09:40 -07:00
2020-08-03 15:51:25 -07:00
2020-06-14 01:57:21 +09:00
2020-07-23 17:04:28 +02:00
2020-08-02 18:26:51 +03:00
2020-07-16 11:26:40 -07:00
2020-07-31 15:11:52 -07:00
2020-07-25 13:27:12 -07:00
2020-06-10 16:05:54 -07:00
2020-07-29 10:35:37 -07:00
2020-07-15 19:00:12 -07:00
2020-07-25 13:27:12 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 14:46:52 +01:00
2020-07-13 17:55:57 +02:00
2020-06-25 13:52:53 +02:00
2020-07-31 16:55:32 -07:00
2020-06-04 19:06:23 -07:00
2020-05-15 16:25:20 +02:00
2020-05-28 18:02:40 +09:00
2020-06-17 10:57:41 -07:00
2020-07-15 15:58:11 -07:00
2020-07-10 15:39:29 +05:30
2020-06-18 20:25:25 +02:00
2020-06-14 01:57:21 +09:00
2020-05-29 17:36:02 +09:00
2020-06-15 23:08:31 -05:00
2020-07-29 13:13:50 -04:00
2020-07-13 22:11:17 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-26 23:53:25 +02:00
2020-07-31 13:04:00 +10:00
2020-06-14 01:57:21 +09:00
2020-07-17 09:43:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-29 10:30:35 +00:00
2020-07-18 08:11:44 -07:00
2020-07-10 15:12:48 +02:00
2020-07-28 18:37:17 +02:00
2020-06-14 01:57:21 +09:00
2020-07-08 09:20:50 +02:00
2020-08-02 01:02:12 -07:00
2020-07-13 18:31:15 -07:00
2020-07-23 10:45:24 +02:00
2020-07-22 17:29:28 +02:00
2020-06-14 01:57:21 +09:00
2020-07-06 12:48:04 -07:00
2020-07-24 16:36:13 -07:00
2020-06-04 11:03:45 -07:00
2020-06-02 15:29:19 -07:00
2020-06-14 01:57:21 +09:00
2020-06-10 22:43:57 -05:00
2020-07-23 14:39:37 -04:00
2020-06-26 00:27:37 -07:00
2020-05-28 14:18:11 +02:00
2020-06-26 22:51:53 -04:00
2020-07-14 17:44:42 +02:00
2020-07-19 08:15:36 +03:00
2020-07-13 12:17:34 +02:00
2020-07-07 21:04:38 +02:00
2020-08-04 13:03:36 -07:00
2020-07-20 18:31:33 -07:00
2020-06-05 20:02:09 -04:00
2020-07-08 17:08:01 -07:00
2020-07-29 08:05:44 +02:00
2020-05-27 11:09:26 +02:00
2020-08-03 15:01:02 -07:00
2020-07-16 08:50:54 +05:30
2020-06-15 23:08:32 -05:00
2020-06-14 01:57:21 +09:00
2020-07-30 12:01:42 -07:00
2020-06-14 01:57:21 +09:00
2020-07-17 10:51:44 +01:00
2020-07-08 18:00:07 +02:00
2020-08-01 10:11:42 -07:00
2020-07-15 12:47:04 +03:00
2020-06-14 01:57:21 +09:00
2020-06-10 11:28:35 -07:00
2020-06-13 13:29:16 -07:00
2020-06-14 01:57:21 +09:00
2020-05-19 00:10:35 +10:00
2020-07-30 16:46:59 -07:00
2020-06-04 19:09:28 +02:00
2020-06-15 23:08:32 -05:00
2020-06-25 15:29:21 +01:00
2020-06-08 13:01:08 -07:00
2020-06-07 10:59:32 -07:00
2020-06-08 13:01:08 -07:00
2020-06-07 16:11:23 -07:00
2020-07-31 16:44:36 -07:00
2020-06-14 01:57:21 +09:00
2020-08-02 01:02:12 -07:00
2020-06-14 01:57:21 +09:00
2020-05-15 16:21:08 +02:00
2020-07-16 22:08:07 +02:00
2020-06-22 17:15:20 +05:30
2020-07-17 10:24:09 -07:00
2020-07-15 19:47:10 +03:00
2020-08-02 01:02:12 -07:00
2020-06-13 13:29:16 -07:00
2020-06-09 09:39:14 -07:00
2020-07-16 11:08:54 -07:00
2020-06-25 15:45:30 +03:00
2020-07-24 10:58:14 +02:00
2020-07-03 10:52:02 +02:00
2020-07-23 13:21:01 +02:00
2020-06-22 12:34:21 -04:00
2020-07-17 08:28:40 -06:00
2020-07-29 13:24:30 -04:00
2020-07-23 16:22:25 +02:00
2020-07-10 13:40:19 +02:00
2020-07-30 11:28:17 -04:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-15 23:08:32 -05:00
2020-06-14 01:57:21 +09:00
2020-07-11 11:16:46 -07:00
2020-06-14 01:57:21 +09:00