Saurabh Sengar
46fcb0fc88
scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq
...
commit d957e7ffb2c72410bcc1a514153a46719255a5da upstream.
storvsc_error_wq workqueue should not be marked as WQ_MEM_RECLAIM as it
doesn't need to make forward progress under memory pressure. Marking this
workqueue as WQ_MEM_RECLAIM may cause deadlock while flushing a
non-WQ_MEM_RECLAIM workqueue. In the current state it causes the following
warning:
[ 14.506347] ------------[ cut here ]------------
[ 14.506354] workqueue: WQ_MEM_RECLAIM storvsc_error_wq_0:storvsc_remove_lun is flushing !WQ_MEM_RECLAIM events_freezable_power_:disk_events_workfn
[ 14.506360] WARNING: CPU: 0 PID: 8 at <-snip->kernel/workqueue.c:2623 check_flush_dependency+0xb5/0x130
[ 14.506390] CPU: 0 PID: 8 Comm: kworker/u4:0 Not tainted 5.4.0-1086-azure #91~18.04.1-Ubuntu
[ 14.506391] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 05/09/2022
[ 14.506393] Workqueue: storvsc_error_wq_0 storvsc_remove_lun
[ 14.506395] RIP: 0010:check_flush_dependency+0xb5/0x130
<-snip->
[ 14.506408] Call Trace:
[ 14.506412] __flush_work+0xf1/0x1c0
[ 14.506414] __cancel_work_timer+0x12f/0x1b0
[ 14.506417] ? kernfs_put+0xf0/0x190
[ 14.506418] cancel_delayed_work_sync+0x13/0x20
[ 14.506420] disk_block_events+0x78/0x80
[ 14.506421] del_gendisk+0x3d/0x2f0
[ 14.506423] sr_remove+0x28/0x70
[ 14.506427] device_release_driver_internal+0xef/0x1c0
[ 14.506428] device_release_driver+0x12/0x20
[ 14.506429] bus_remove_device+0xe1/0x150
[ 14.506431] device_del+0x167/0x380
[ 14.506432] __scsi_remove_device+0x11d/0x150
[ 14.506433] scsi_remove_device+0x26/0x40
[ 14.506434] storvsc_remove_lun+0x40/0x60
[ 14.506436] process_one_work+0x209/0x400
[ 14.506437] worker_thread+0x34/0x400
[ 14.506439] kthread+0x121/0x140
[ 14.506440] ? process_one_work+0x400/0x400
[ 14.506441] ? kthread_park+0x90/0x90
[ 14.506443] ret_from_fork+0x35/0x40
[ 14.506445] ---[ end trace 2d9633159fdc6ee7 ]---
Link: https://lore.kernel.org/r/1659628534-17539-1-git-send-email-ssengar@linux.microsoft.com
Fixes: 436ad9413353 ("scsi: storvsc: Allow only one remove lun work item to be issued per lun")
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-31 17:15:24 +02:00
..
2020-12-30 11:53:02 +01:00
2021-07-25 14:36:16 +02:00
2021-07-25 14:36:16 +02:00
2021-07-20 16:05:39 +02:00
2020-10-14 15:15:35 -07:00
2022-04-20 09:23:16 +02:00
2022-04-13 21:00:55 +02:00
2022-02-08 18:30:39 +01:00
2022-04-20 09:23:16 +02:00
2021-11-18 14:04:18 +01:00
2022-04-20 09:23:16 +02:00
2020-10-16 12:21:15 -07:00
2021-08-26 08:35:37 -04:00
2020-03-11 23:07:59 -04:00
2020-10-14 15:15:35 -07:00
2022-06-09 10:21:15 +02:00
2021-02-07 15:37:14 +01:00
2022-07-21 21:20:14 +02:00
2021-05-14 09:50:27 +02:00
2022-04-20 09:23:21 +02:00
2021-07-25 14:36:16 +02:00
2022-04-13 21:00:59 +02:00
2022-04-08 14:39:52 +02:00
2022-08-25 11:38:15 +02:00
2022-04-20 09:23:24 +02:00
2022-03-23 09:13:29 +01:00
2022-04-20 09:23:24 +02:00
2021-09-18 13:40:14 +02:00
2022-04-20 09:23:15 +02:00
2022-02-16 12:54:19 +01:00
2022-04-27 13:53:54 +02:00
2022-08-21 15:16:14 +02:00
2022-04-20 09:23:16 +02:00
2022-08-21 15:15:59 +02:00
2020-10-07 23:50:03 -04:00
2020-10-23 16:19:02 -07:00
2022-08-31 17:15:24 +02:00
2020-03-25 11:50:48 +01:00
2019-10-23 17:23:44 +02:00
2020-10-23 16:19:02 -07:00
2020-09-25 06:20:43 +02:00
2020-06-09 09:39:13 -07:00
2020-06-09 09:39:13 -07:00
2021-11-26 10:39:10 +01:00
2022-04-13 21:00:58 +02:00
2020-03-26 21:10:53 -04:00
2019-11-12 22:21:34 -05:00
2019-11-12 22:21:35 -05:00
2021-09-18 13:40:35 +02:00
2021-06-03 09:00:43 +02:00
2020-02-24 14:54:25 -05:00
2020-04-01 22:03:04 -04:00
2022-06-09 10:21:24 +02:00
2020-09-01 22:15:47 -04:00
2020-03-11 23:07:59 -04:00
2020-08-23 17:36:59 -05:00
2019-12-19 22:08:51 -05:00
2020-09-02 22:49:07 -04:00
2019-07-30 12:17:28 -04:00
2020-07-08 01:12:44 -04:00
2021-07-14 16:56:40 +02:00
2020-08-23 17:36:59 -05:00
2020-03-17 13:36:10 -04:00
2020-10-07 21:48:28 -04:00
2020-06-09 09:39:13 -07:00
2021-10-27 09:56:56 +02:00
2020-09-02 22:49:06 -04:00
2020-10-29 21:55:21 -04:00
2020-09-02 22:49:06 -04:00
2020-08-23 17:36:59 -05:00
2020-10-07 21:48:28 -04:00
2022-06-22 14:13:14 +02:00
2020-07-15 17:26:58 -04:00
2020-07-24 22:32:00 -04:00
2020-06-02 21:23:47 -04:00
2020-10-13 12:12:44 -07:00
2021-05-14 09:50:27 +02:00
2020-07-24 22:09:55 -04:00
2020-06-09 09:39:13 -07:00
2020-10-02 15:27:08 -07:00
2022-04-20 09:23:15 +02:00
2020-06-09 09:39:13 -07:00
2020-10-02 21:52:53 -04:00
2019-11-12 22:21:34 -05:00
2019-07-17 22:39:27 +09:00
2022-06-09 10:20:52 +02:00
2020-08-23 17:36:59 -05:00
2020-06-09 09:39:13 -07:00
2020-10-02 21:42:22 -04:00
2020-03-11 23:07:56 -04:00
2022-06-14 18:32:43 +02:00
2020-01-02 21:57:44 -05:00
2022-02-16 12:54:20 +01:00
2020-01-02 21:57:44 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2019-06-20 15:37:02 -04:00
2020-09-15 17:34:18 -04:00
2022-06-22 14:13:15 +02:00
2020-03-11 23:07:56 -04:00
2020-08-23 17:36:59 -05:00
2020-09-09 22:37:48 -04:00
2020-01-15 23:09:11 -05:00
2020-10-14 15:15:35 -07:00
2022-06-29 08:59:46 +02:00
2022-01-27 10:54:29 +01:00
2021-06-18 10:00:05 +02:00
2020-07-08 01:16:23 -04:00
2020-10-14 15:15:35 -07:00
2020-08-23 17:36:59 -05:00
2021-11-18 14:03:37 +01:00
2020-07-24 22:09:57 -04:00
2019-12-19 22:08:54 -05:00
2022-01-27 10:54:08 +01:00
2020-10-02 18:53:06 -04:00
2020-02-04 03:05:26 +00:00
2021-08-26 08:35:37 -04:00
2021-12-01 09:19:05 +01:00
2020-03-16 22:08:36 -04:00
2020-09-02 22:49:07 -04:00
2022-04-20 09:23:30 +02:00
2021-07-20 16:05:40 +02:00
2021-01-12 20:18:15 +01:00
2021-04-21 13:00:52 +02:00
2021-11-06 14:10:08 +01:00
2020-03-24 07:57:08 -06:00
2021-09-30 10:11:01 +02:00
2022-06-14 18:32:37 +02:00
2020-10-14 15:15:35 -07:00
2020-09-15 20:28:06 -04:00
2021-10-17 10:43:33 +02:00
2022-08-21 15:15:24 +02:00
2020-09-25 06:20:44 +02:00
2021-05-14 09:50:27 +02:00
2022-01-27 10:54:23 +01:00
2022-01-27 10:54:23 +01:00
2020-02-24 15:01:57 -05:00
2021-04-07 15:00:05 +02:00
2020-03-11 23:07:56 -04:00
2022-08-31 17:15:24 +02:00
2020-08-23 17:36:59 -05:00
2021-05-14 09:50:27 +02:00
2020-10-02 21:52:55 -04:00
2021-10-17 10:43:33 +02:00
2022-01-05 12:40:33 +01:00
2022-06-22 14:13:14 +02:00
2020-08-23 17:36:59 -05:00
2019-07-11 15:14:01 -07:00
2022-03-11 12:11:54 +01:00
2020-01-06 09:45:59 +01:00
2022-04-13 21:01:04 +02:00
2020-06-09 09:39:13 -07:00