From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Wanpeng Li <wanpengli@tencent.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.15 056/110] KVM: Fix lockdep false negative during host resume
Date: Mon, 14 Mar 2022 12:53:58 +0100 [thread overview]
Message-ID: <20220314112744.599617078@linuxfoundation.org> (raw)
In-Reply-To: <20220314112743.029192918@linuxfoundation.org>
From: Wanpeng Li <wanpengli@tencent.com>
[ Upstream commit 4cb9a998b1ce25fad74a82f5a5c45a4ef40de337 ]
I saw the below splatting after the host suspended and resumed.
WARNING: CPU: 0 PID: 2943 at kvm/arch/x86/kvm/../../../virt/kvm/kvm_main.c:5531 kvm_resume+0x2c/0x30 [kvm]
CPU: 0 PID: 2943 Comm: step_after_susp Tainted: G W IOE 5.17.0-rc3+ #4
RIP: 0010:kvm_resume+0x2c/0x30 [kvm]
Call Trace:
<TASK>
syscore_resume+0x90/0x340
suspend_devices_and_enter+0xaee/0xe90
pm_suspend.cold+0x36b/0x3c2
state_store+0x82/0xf0
kernfs_fop_write_iter+0x1b6/0x260
new_sync_write+0x258/0x370
vfs_write+0x33f/0x510
ksys_write+0xc9/0x160
do_syscall_64+0x3b/0xc0
entry_SYSCALL_64_after_hwframe+0x44/0xae
lockdep_is_held() can return -1 when lockdep is disabled which triggers
this warning. Let's use lockdep_assert_not_held() which can detect
incorrect calls while holding a lock and it also avoids false negatives
when lockdep is disabled.
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1644920142-81249-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
virt/kvm/kvm_main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f8b42e19bc77..fcceb8443aa9 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -5417,9 +5417,7 @@ static int kvm_suspend(void)
static void kvm_resume(void)
{
if (kvm_usage_count) {
-#ifdef CONFIG_LOCKDEP
- WARN_ON(lockdep_is_held(&kvm_count_lock));
-#endif
+ lockdep_assert_not_held(&kvm_count_lock);
hardware_enable_nolock(NULL);
}
}
--
2.34.1
next prev parent reply other threads:[~2022-03-14 12:20 UTC|newest]
Thread overview: 123+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 11:53 [PATCH 5.15 000/110] 5.15.29-rc1 review Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 001/110] arm64: dts: qcom: sm8350: Describe GCC dependency clocks Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 002/110] arm64: dts: qcom: sm8350: Correct UFS symbol clocks Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 003/110] HID: elo: Revert USB reference counting Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 004/110] HID: hid-thrustmaster: fix OOB read in thrustmaster_interrupts Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 005/110] ARM: boot: dts: bcm2711: Fix HVS register range Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 006/110] clk: qcom: gdsc: Add support to update GDSC transition delay Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 007/110] clk: qcom: dispcc: Update the transition delay for MDSS GDSC Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 008/110] HID: vivaldi: fix sysfs attributes leak Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 009/110] arm64: dts: armada-3720-turris-mox: Add missing ethernet0 alias Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 010/110] tipc: fix kernel panic when enabling bearer Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 011/110] vdpa/mlx5: add validation for VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 012/110] vduse: Fix returning wrong type in vduse_domain_alloc_iova() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 013/110] net: phy: meson-gxl: fix interrupt handling in forced mode Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 014/110] mISDN: Fix memory leak in dsp_pipeline_build() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 015/110] vhost: fix hung thread due to erroneous iotlb entries Greg Kroah-Hartman
2022-03-14 16:14 ` Anirudh Rayabharam
2022-03-15 9:19 ` Greg Kroah-Hartman
2022-03-15 11:50 ` Michael S. Tsirkin
2022-03-15 12:39 ` Greg Kroah-Hartman
2022-03-15 13:30 ` Michael S. Tsirkin
2022-03-14 11:53 ` [PATCH 5.15 016/110] virtio-blk: Dont use MAX_DISCARD_SEGMENTS if max_discard_seg is zero Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 017/110] vdpa: fix use-after-free on vp_vdpa_remove Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 018/110] isdn: hfcpci: check the return value of dma_set_mask() in setup_hw() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 019/110] net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 020/110] esp: Fix possible buffer overflow in ESP transformation Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 021/110] esp: Fix BEET mode inter address family tunneling on GSO Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 022/110] qed: return status of qed_iov_get_link Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 023/110] smsc95xx: Ignore -ENODEV errors when device is unplugged Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 024/110] gpiolib: acpi: Convert ACPI value of debounce to microseconds Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 025/110] drm/sun4i: mixer: Fix P010 and P210 format numbers Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 026/110] net: dsa: mt7530: fix incorrect test in mt753x_phylink_validate() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 027/110] ARM: dts: aspeed: Fix AST2600 quad spi group Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 028/110] iavf: Fix handling of vlan strip virtual channel messages Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 029/110] i40e: stop disabling VFs due to PF error responses Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 030/110] ice: " Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 031/110] ice: Fix error with handling of bonding MTU Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 032/110] ice: Dont use GFP_KERNEL in atomic context Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 033/110] ice: Fix curr_link_speed advertised speed Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 034/110] ethernet: Fix error handling in xemaclite_of_probe Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 035/110] tipc: fix incorrect order of state message data sanity check Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 036/110] net: ethernet: ti: cpts: Handle error for clk_enable Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 037/110] net: ethernet: lpc_eth: " Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 038/110] net: marvell: prestera: Add missing of_node_put() in prestera_switch_set_base_mac_addr Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 039/110] ax25: Fix NULL pointer dereference in ax25_kill_by_device Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 040/110] net/mlx5: Fix size field in bufferx_reg struct Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 041/110] net/mlx5: Fix a race on command flush flow Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 042/110] net/mlx5e: Lag, Only handle events from highest priority multipath entry Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 043/110] NFC: port100: fix use-after-free in port100_send_complete Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 044/110] selftests: pmtu.sh: Kill tcpdump processes launched by subshell Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 045/110] selftests: pmtu.sh: Kill nettest processes launched in subshell Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 046/110] gpio: ts4900: Do not set DAT and OE together Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 047/110] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 048/110] net: phy: DP83822: clear MISR2 register to disable interrupts Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 049/110] sctp: fix kernel-infoleak for SCTP sockets Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 050/110] net: bcmgenet: Dont claim WOL when its not available Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 051/110] net: phy: meson-gxl: improve link-up behavior Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 052/110] selftests/bpf: Add test for bpf_timer overwriting crash Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 053/110] swiotlb: fix info leak with DMA_FROM_DEVICE Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 054/110] usb: dwc3: pci: add support for the Intel Raptor Lake-S Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.15 055/110] pinctrl: tigerlake: Revert "Add Alder Lake-M ACPI ID" Greg Kroah-Hartman
2022-03-14 11:53 ` Greg Kroah-Hartman [this message]
2022-03-14 11:53 ` [PATCH 5.15 057/110] kvm: x86: Disable KVM_HC_CLOCK_PAIRING if tsc is in always catchup mode Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 058/110] spi: rockchip: Fix error in getting num-cs property Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 059/110] spi: rockchip: terminate dma transmission when slave abort Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 060/110] drm/vc4: hdmi: Unregister codec device on unbind Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 061/110] x86/kvm: Dont use pv tlb/ipi/sched_yield if on 1 vCPU Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 062/110] net-sysfs: add check for netdevice being present to speed_show Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 063/110] hwmon: (pmbus) Clear pmbus fault/warning bits after read Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 064/110] PCI: Mark all AMD Navi10 and Navi14 GPU ATS as broken Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 065/110] gpio: Return EPROBE_DEFER if gc->to_irq is NULL Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 066/110] drm/amdgpu: bypass tiling flag check in virtual display case (v2) Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 067/110] Revert "xen-netback: remove hotplug-status once it has served its purpose" Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 068/110] Revert "xen-netback: Check for hotplug-status existence before watching" Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 069/110] ipv6: prevent a possible race condition with lifetimes Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 070/110] tracing: Ensure trace buffer is at least 4096 bytes large Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 071/110] tracing/osnoise: Make osnoise_main to sleep for microseconds Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 072/110] selftest/vm: fix map_fixed_noreplace test failure Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 073/110] selftests/memfd: clean up mapping in mfd_fail_write Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 074/110] ARM: Spectre-BHB: provide empty stub for non-config Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 075/110] fuse: fix fileattr op failure Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 076/110] fuse: fix pipe buffer lifetime for direct_io Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 077/110] staging: rtl8723bs: Fix access-point mode deadlock Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 078/110] staging: gdm724x: fix use after free in gdm_lte_rx() Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 079/110] net: macb: Fix lost RX packet wakeup race in NAPI receive Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 080/110] riscv: alternative only works on !XIP_KERNEL Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 081/110] mmc: meson: Fix usage of meson_mmc_post_req() Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 082/110] riscv: Fix auipc+jalr relocation range checks Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 083/110] tracing/osnoise: Force quiescent states while tracing Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 084/110] arm64: dts: marvell: armada-37xx: Remap IO space to bus address 0x0 Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 085/110] arm64: Ensure execute-only permissions are not allowed without EPAN Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 086/110] arm64: kasan: fix include error in MTE functions Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 087/110] swiotlb: rework "fix info leak with DMA_FROM_DEVICE" Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 088/110] KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 089/110] virtio: unexport virtio_finalize_features Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 090/110] virtio: acknowledge all features before access Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 091/110] net/mlx5: Fix offloading with ESWITCH_IPV4_TTL_MODIFY_ENABLE Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 092/110] ARM: fix Thumb2 regression with Spectre BHB Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 093/110] watch_queue: Fix filter limit check Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 094/110] watch_queue, pipe: Free watchqueue state after clearing pipe ring Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 095/110] watch_queue: Fix to release page in ->release() Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 096/110] watch_queue: Fix to always request a pow-of-2 pipe ring size Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 097/110] watch_queue: Fix the alloc bitmap size to reflect notes allocated Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 098/110] watch_queue: Free the alloc bitmap when the watch_queue is torn down Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 099/110] watch_queue: Fix lack of barrier/sync/lock between post and read Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 100/110] watch_queue: Make comment about setting ->defunct more accurate Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 101/110] x86/boot: Fix memremap of setup_indirect structures Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 102/110] x86/boot: Add setup_indirect support in early_memremap_is_setup_data() Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 103/110] x86/sgx: Free backing memory after faulting the enclave page Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 104/110] x86/traps: Mark do_int3() NOKPROBE_SYMBOL Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 105/110] drm/panel: Select DRM_DP_HELPER for DRM_PANEL_EDP Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 106/110] btrfs: make send work with concurrent block group relocation Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 107/110] drm/i915: Workaround broken BIOS DBUF configuration on TGL/RKL Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 108/110] riscv: dts: k210: fix broken IRQs on hart1 Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 109/110] block: drop unused includes in <linux/genhd.h> Greg Kroah-Hartman
2022-03-14 11:54 ` [PATCH 5.15 110/110] Revert "net: dsa: mv88e6xxx: flush switchdev FDB workqueue before removing VLAN" Greg Kroah-Hartman
2022-03-14 22:37 ` [PATCH 5.15 000/110] 5.15.29-rc1 review Florian Fainelli
2022-03-14 22:43 ` Ron Economos
2022-03-15 0:53 ` Guenter Roeck
2022-03-15 5:13 ` Naresh Kamboju
2022-03-15 10:58 ` Bagas Sanjaya
2022-03-15 12:32 ` Sudip Mukherjee
2022-03-15 13:49 ` Fox Chen
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=20220314112744.599617078@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=wanpengli@tencent.com \
/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