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
..
2022-07-29 17:19:28 +02:00
2022-08-31 17:15:23 +02:00
2022-04-08 14:40:02 +02:00
2022-08-25 11:37:50 +02:00
2022-08-25 11:38:02 +02:00
2022-08-21 15:15:55 +02:00
2022-08-31 17:15:22 +02:00
2022-08-21 15:15:49 +02:00
2022-08-21 15:15:35 +02:00
2022-06-29 08:59:54 +02:00
2022-08-25 11:38:14 +02:00
2022-07-07 17:52:23 +02:00
2022-07-21 21:20:14 +02:00
2022-08-21 15:15:50 +02:00
2022-04-08 14:40:16 +02:00
2022-07-07 17:52:18 +02:00
2022-08-25 11:38:17 +02:00
2022-06-29 08:59:48 +02:00
2022-08-03 12:00:50 +02:00
2022-06-14 18:32:43 +02:00
2022-05-12 12:25:32 +02:00
2022-08-21 15:16:17 +02:00
2022-08-21 15:15:53 +02:00
2022-04-08 14:40:23 +02:00
2022-08-21 15:16:01 +02:00
2022-08-25 11:38:12 +02:00
2022-04-08 14:39:50 +02:00
2022-08-21 15:16:15 +02:00
2022-06-22 14:13:16 +02:00
2022-08-21 15:15:35 +02:00
2022-08-21 15:16:17 +02:00
2022-08-25 11:38:08 +02:00
2022-07-25 11:26:43 +02:00
2022-08-21 15:15:54 +02:00
2022-08-25 11:38:16 +02:00
2022-08-21 15:16:15 +02:00
2022-08-21 15:16:00 +02:00
2022-08-21 15:16:17 +02:00
2022-08-25 11:38:12 +02:00
2022-03-16 14:15:57 +01:00
2022-05-09 09:04:56 +02:00
2022-08-11 13:06:47 +02:00
2022-06-09 10:21:18 +02:00
2022-08-31 17:15:23 +02:00
2022-08-21 15:15:46 +02:00
2022-06-29 08:59:54 +02:00
2022-08-21 15:15:58 +02:00
2022-08-21 15:16:09 +02:00
2022-08-25 11:38:15 +02:00
2022-08-25 11:37:50 +02:00
2022-08-21 15:16:26 +02:00
2022-08-31 17:15:21 +02:00
2022-08-31 17:15:16 +02:00
2022-08-25 11:38:01 +02:00
2022-07-07 17:52:15 +02:00
2022-08-25 11:38:17 +02:00
2022-06-09 10:21:03 +02:00
2022-08-21 15:16:04 +02:00
2022-08-21 15:15:23 +02:00
2022-08-25 11:38:23 +02:00
2022-06-14 18:32:30 +02:00
2022-08-21 15:15:36 +02:00
2022-06-14 18:32:32 +02:00
2022-08-31 17:15:14 +02:00
2022-08-25 11:38:12 +02:00
2022-07-29 17:19:10 +02:00
2022-04-13 21:00:55 +02:00
2022-08-21 15:15:37 +02:00
2022-08-21 15:15:36 +02:00
2022-08-21 15:16:08 +02:00
2022-04-27 13:53:52 +02:00
2022-08-21 15:16:08 +02:00
2022-06-14 18:32:33 +02:00
2022-08-21 15:16:13 +02:00
2022-08-31 17:15:24 +02:00
2022-05-18 10:23:47 +02:00
2022-08-21 15:15:36 +02:00
2022-08-21 15:15:56 +02:00
2022-08-25 11:38:06 +02:00
2022-08-21 15:15:57 +02:00
2022-06-09 10:21:01 +02:00
2022-08-25 11:38:24 +02:00
2022-08-21 15:15:22 +02:00
2022-08-25 11:38:18 +02:00
2022-08-25 11:38:15 +02:00
2022-06-09 10:21:29 +02:00
2022-08-25 11:38:18 +02:00
2022-06-14 18:32:45 +02:00
2022-08-25 11:38:22 +02:00
2022-08-25 11:38:14 +02:00
2022-07-21 21:20:13 +02:00
2022-04-13 21:01:01 +02:00
2022-08-21 15:16:10 +02:00
2022-08-31 17:15:23 +02:00