stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Michael Kelley <mikelley@microsoft.com>,
	Saurabh Sengar <ssengar@linux.microsoft.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH 5.10 85/86] scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq
Date: Mon, 29 Aug 2022 12:59:51 +0200	[thread overview]
Message-ID: <20220829105800.005902500@linuxfoundation.org> (raw)
In-Reply-To: <20220829105756.500128871@linuxfoundation.org>

From: Saurabh Sengar <ssengar@linux.microsoft.com>

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>
---
 drivers/scsi/storvsc_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1997,7 +1997,7 @@ static int storvsc_probe(struct hv_devic
 	 */
 	host_dev->handle_error_wq =
 			alloc_ordered_workqueue("storvsc_error_wq_%d",
-						WQ_MEM_RECLAIM,
+						0,
 						host->host_no);
 	if (!host_dev->handle_error_wq) {
 		ret = -ENOMEM;



  parent reply	other threads:[~2022-08-29 11:26 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 10:58 [PATCH 5.10 00/86] 5.10.140-rc1 review Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 01/86] audit: fix potential double free on error path from fsnotify_add_inode_mark Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 02/86] parisc: Fix exception handler for fldw and fstw instructions Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 03/86] kernel/sys_ni: add compat entry for fadvise64_64 Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 04/86] pinctrl: amd: Dont save/restore interrupt status and wake status bits Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 05/86] xfs: prevent a WARN_ONCE() in xfs_ioc_attr_list() Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 06/86] xfs: reject crazy array sizes being fed to XFS_IOC_GETBMAP* Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 07/86] fs: remove __sync_filesystem Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 08/86] vfs: make sync_filesystem return errors from ->sync_fs Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 09/86] xfs: return errors in xfs_fs_sync_fs Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 10/86] xfs: only bother with sync_filesystem during readonly remount Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 11/86] kernel/sched: Remove dl_boosted flag comment Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 12/86] xfrm: fix refcount leak in __xfrm_policy_check() Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 13/86] xfrm: clone missing x->lastused in xfrm_do_migrate Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 14/86] af_key: Do not call xfrm_probe_algs in parallel Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 15/86] xfrm: policy: fix metadata dst->dev xmit null pointer dereference Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 16/86] NFS: Dont allocate nfs_fattr on the stack in __nfs42_ssc_open() Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 17/86] NFSv4.2 fix problems with __nfs42_ssc_open Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 18/86] SUNRPC: RPC level errors should set task->tk_rpc_status Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 19/86] mm/huge_memory.c: use helper function migration_entry_to_page() Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 20/86] mm/smaps: dont access young/dirty bit if pte unpresent Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 21/86] rose: check NULL rose_loopback_neigh->loopback Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 22/86] nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 23/86] ice: xsk: Force rings to be sized to power of 2 Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 24/86] ice: xsk: prohibit usage of non-balanced queue id Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 25/86] net/mlx5e: Properly disable vlan strip on non-UL reps Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 26/86] net: ipa: dont assume SMEM is page-aligned Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 27/86] net: moxa: get rid of asymmetry in DMA mapping/unmapping Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 28/86] bonding: 802.3ad: fix no transmission of LACPDUs Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 29/86] net: ipvtap - add __init/__exit annotations to module init/exit funcs Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 30/86] netfilter: ebtables: reject blobs that dont provide all entry points Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 31/86] bnxt_en: fix NQ resource accounting during vf creation on 57500 chips Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 32/86] netfilter: nft_payload: report ERANGE for too long offset and length Greg Kroah-Hartman
2022-08-29 10:58 ` [PATCH 5.10 33/86] netfilter: nft_payload: do not truncate csum_offset and csum_type Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 34/86] netfilter: nf_tables: do not leave chain stats enabled on error Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 35/86] netfilter: nft_osf: restrict osf to ipv4, ipv6 and inet families Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 36/86] netfilter: nft_tunnel: restrict it to netdev family Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 37/86] netfilter: nftables: remove redundant assignment of variable err Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 38/86] netfilter: nf_tables: consolidate rule verdict trace call Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 39/86] netfilter: nft_cmp: optimize comparison for 16-bytes Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 40/86] netfilter: bitwise: improve error goto labels Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 41/86] netfilter: nf_tables: upfront validation of data via nft_data_init() Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 42/86] netfilter: nf_tables: disallow jump to implicit chain from set element Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 43/86] netfilter: nf_tables: disallow binding to already bound chain Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 44/86] tcp: tweak len/truesize ratio for coalesce candidates Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 45/86] net: Fix data-races around sysctl_[rw]mem(_offset)? Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 46/86] net: Fix data-races around sysctl_[rw]mem_(max|default) Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 47/86] net: Fix data-races around weight_p and dev_weight_[rt]x_bias Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 48/86] net: Fix data-races around netdev_max_backlog Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 49/86] net: Fix data-races around netdev_tstamp_prequeue Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 50/86] ratelimit: Fix data-races in ___ratelimit() Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 51/86] bpf: Folding omem_charge() into sk_storage_charge() Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 52/86] net: Fix data-races around sysctl_optmem_max Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 53/86] net: Fix a data-race around sysctl_tstamp_allow_data Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 54/86] net: Fix a data-race around sysctl_net_busy_poll Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 55/86] net: Fix a data-race around sysctl_net_busy_read Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 56/86] net: Fix a data-race around netdev_budget Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 57/86] net: Fix a data-race around netdev_budget_usecs Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 58/86] net: Fix data-races around sysctl_fb_tunnels_only_for_init_net Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 59/86] net: Fix data-races around sysctl_devconf_inherit_init_net Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 60/86] net: Fix a data-race around sysctl_somaxconn Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 61/86] ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 62/86] rxrpc: Fix locking in rxrpcs sendmsg Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 63/86] ionic: fix up issues with handling EAGAIN on FW cmds Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 64/86] btrfs: fix silent failure when deleting root reference Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 65/86] btrfs: replace: drop assert for suspended replace Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 66/86] btrfs: add info when mount fails due to stale replace target Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 67/86] btrfs: check if root is readonly while setting security xattr Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 68/86] perf/x86/lbr: Enable the branch type for the Arch LBR by default Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 69/86] x86/unwind/orc: Unwind ftrace trampolines with correct ORC entry Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 70/86] x86/bugs: Add "unknown" reporting for MMIO Stale Data Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 71/86] loop: Check for overflow while configuring loop Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 72/86] asm-generic: sections: refactor memory_intersects Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 73/86] s390: fix double free of GS and RI CBs on fork() failure Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 74/86] ACPI: processor: Remove freq Qos request for all CPUs Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 75/86] xen/privcmd: fix error exit of privcmd_ioctl_dm_op() Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 76/86] mm/hugetlb: fix hugetlb not supporting softdirty tracking Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 77/86] Revert "md-raid: destroy the bitmap after destroying the thread" Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 78/86] md: call __md_stop_writes in md_stop Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 79/86] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76 Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 80/86] Documentation/ABI: Mention retbleed vulnerability info file for sysfs Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 81/86] blk-mq: fix io hung due to missing commit_rqs Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 82/86] perf python: Fix build when PYTHON_CONFIG is user supplied Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 83/86] perf/x86/intel/uncore: Fix broken read_counter() for SNB IMC PMU Greg Kroah-Hartman
2022-08-29 10:59 ` [PATCH 5.10 84/86] scsi: ufs: core: Enable link lost interrupt Greg Kroah-Hartman
2022-08-29 10:59 ` Greg Kroah-Hartman [this message]
2022-08-29 10:59 ` [PATCH 5.10 86/86] bpf: Dont use tnum_range on array range checking for poke descriptors Greg Kroah-Hartman
2022-08-29 17:19 ` [PATCH 5.10 00/86] 5.10.140-rc1 review Florian Fainelli
2022-08-29 17:56 ` Slade Watkins
2022-08-29 18:41 ` Pavel Machek
2022-08-29 22:19 ` Shuah Khan
2022-08-30  0:47 ` Guenter Roeck
2022-08-30  2:16 ` Daniel Díaz
2022-08-30 10:21 ` Jon Hunter
2022-08-30 10:41 ` Sudip Mukherjee (Codethink)
2022-08-30 11:56 ` Rudi Heitbaum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220829105800.005902500@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mikelley@microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).