From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Will Deacon <will.deacon@arm.com>, Ingo Molnar <mingo@kernel.org>,
Sasha Levin <alexander.levin@microsoft.com>
Subject: [PATCH 4.4 20/79] locking/lockdep: Do not record IRQ state within lockdep code
Date: Thu, 23 Aug 2018 09:52:56 +0200 [thread overview]
Message-ID: <20180823074920.027247953@linuxfoundation.org> (raw)
In-Reply-To: <20180823074918.641878835@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
[ Upstream commit fcc784be837714a9173b372ff9fb9b514590dad9 ]
While debugging where things were going wrong with mapping
enabling/disabling interrupts with the lockdep state and actual real
enabling and disabling interrupts, I had to silent the IRQ
disabling/enabling in debug_check_no_locks_freed() because it was
always showing up as it was called before the splat was.
Use raw_local_irq_save/restore() for not only debug_check_no_locks_freed()
but for all internal lockdep functions, as they hide useful information
about where interrupts were used incorrectly last.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Link: https://lkml.kernel.org/lkml/20180404140630.3f4f4c7a@gandalf.local.home
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/locking/lockdep.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -1264,11 +1264,11 @@ unsigned long lockdep_count_forward_deps
this.parent = NULL;
this.class = class;
- local_irq_save(flags);
+ raw_local_irq_save(flags);
arch_spin_lock(&lockdep_lock);
ret = __lockdep_count_forward_deps(&this);
arch_spin_unlock(&lockdep_lock);
- local_irq_restore(flags);
+ raw_local_irq_restore(flags);
return ret;
}
@@ -1291,11 +1291,11 @@ unsigned long lockdep_count_backward_dep
this.parent = NULL;
this.class = class;
- local_irq_save(flags);
+ raw_local_irq_save(flags);
arch_spin_lock(&lockdep_lock);
ret = __lockdep_count_backward_deps(&this);
arch_spin_unlock(&lockdep_lock);
- local_irq_restore(flags);
+ raw_local_irq_restore(flags);
return ret;
}
@@ -4123,7 +4123,7 @@ void debug_check_no_locks_freed(const vo
if (unlikely(!debug_locks))
return;
- local_irq_save(flags);
+ raw_local_irq_save(flags);
for (i = 0; i < curr->lockdep_depth; i++) {
hlock = curr->held_locks + i;
@@ -4134,7 +4134,7 @@ void debug_check_no_locks_freed(const vo
print_freed_lock_bug(curr, mem_from, mem_from + mem_len, hlock);
break;
}
- local_irq_restore(flags);
+ raw_local_irq_restore(flags);
}
EXPORT_SYMBOL_GPL(debug_check_no_locks_freed);
next prev parent reply other threads:[~2018-08-23 7:52 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 7:52 [PATCH 4.4 00/79] 4.4.152-stable review Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 01/79] ARC: Explicitly add -mmedium-calls to CFLAGS Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 02/79] netfilter: ipv6: nf_defrag: reduce struct net memory waste Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 03/79] selftests: pstore: return Kselftest Skip code for skipped tests Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 04/79] selftests: static_keys: " Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 05/79] selftests: user: " Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 06/79] selftests: zram: " Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 07/79] selftests: sync: add config fragment for testing sync framework Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 08/79] ARM: dts: Cygnus: Fix I2C controller interrupt type Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 09/79] usb: dwc2: fix isoc split in transfer with no data Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 10/79] usb: gadget: composite: fix delayed_status race condition when set_interface Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 11/79] usb: gadget: dwc2: fix memory leak in gadget_init() Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 12/79] scsi: xen-scsifront: add error handling for xenbus_printf Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 13/79] arm64: make secondary_start_kernel() notrace Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 14/79] qed: Add sanity check for SIMD fastpath handler Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 15/79] enic: initialize enic->rfs_h.lock in enic_probe Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 16/79] net: hamradio: use eth_broadcast_addr Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 17/79] net: propagate dev_get_valid_name return code Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 18/79] ARC: Enable machine_desc->init_per_cpu for !CONFIG_SMP Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 19/79] net: davinci_emac: match the mdio device against its compatible if possible Greg Kroah-Hartman
2018-08-23 7:52 ` Greg Kroah-Hartman [this message]
2018-08-23 7:52 ` [PATCH 4.4 21/79] ipv6: mcast: fix unsolicited report interval after receiving querys Greg Kroah-Hartman
2018-08-23 7:52 ` [PATCH 4.4 22/79] Smack: Mark inode instant in smack_task_to_inode Greg Kroah-Hartman
2018-09-11 18:14 ` Ben Hutchings
2018-09-11 18:53 ` Casey Schaufler
2018-08-23 7:52 ` [PATCH 4.4 23/79] cxgb4: when disabling dcb set txq dcb priority to 0 Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 24/79] brcmfmac: stop watchdog before detach and free everything Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 25/79] ARM: dts: am437x: make edt-ft5x06 a wakeup source Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 26/79] usb: xhci: increase CRS timeout value Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 27/79] perf test session topology: Fix test on s390 Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 28/79] perf report powerpc: Fix crash if callchain is empty Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 29/79] perf tests: Add event parsing error handling to parse events test Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 30/79] selftests/x86/sigreturn/64: Fix spurious failures on AMD CPUs Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 31/79] ARM: dts: da850: Fix interrups property for gpio Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 32/79] dmaengine: k3dma: Off by one in k3_of_dma_simple_xlate() Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 33/79] md/raid10: fix that replacement cannot complete recovery after reassemble Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 34/79] drm/exynos: gsc: Fix support for NV16/61, YUV420/YVU420 and YUV422 modes Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 35/79] drm/exynos: decon5433: Fix per-plane global alpha for XRGB modes Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 36/79] drm/exynos: decon5433: Fix WINCONx reset value Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 37/79] bnx2x: Fix receiving tx-timeout in error or recovery state Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 39/79] HID: wacom: Correct touch maximum XY of 2nd-gen Intuos Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 40/79] ARM: imx_v6_v7_defconfig: Select ULPI support Greg Kroah-Hartman
2018-09-11 19:26 ` Ben Hutchings
2018-08-23 7:53 ` [PATCH 4.4 41/79] ARM: imx_v4_v5_defconfig: " Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 43/79] kasan: fix shadow_size calculation error in kasan_module_alloc Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 44/79] smsc75xx: Add workaround for gigabit link up hardware errata Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 45/79] netfilter: x_tables: set module owner for icmp(6) matches Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 46/79] ARM: pxa: irq: fix handling of ICMR registers in suspend/resume Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 47/79] ieee802154: at86rf230: switch from BUG_ON() to WARN_ON() on problem Greg Kroah-Hartman
2018-09-11 20:02 ` Ben Hutchings
2018-08-23 7:53 ` [PATCH 4.4 48/79] ieee802154: at86rf230: use __func__ macro for debug messages Greg Kroah-Hartman
2018-09-11 20:06 ` Ben Hutchings
2018-09-13 7:06 ` Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 49/79] ieee802154: fakelb: switch from BUG_ON() to WARN_ON() on problem Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 50/79] drm/armada: fix colorkey mode property Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 51/79] bnxt_en: Fix for system hang if request_irq fails Greg Kroah-Hartman
2018-09-11 20:14 ` Ben Hutchings
2018-09-11 20:58 ` Michael Chan
2018-09-11 21:05 ` Ben Hutchings
2018-08-23 7:53 ` [PATCH 4.4 52/79] perf llvm-utils: Remove bashism from kernel include fetch script Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 53/79] ARM: 8780/1: ftrace: Only set kernel memory back to read-only after boot Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 54/79] ARM: dts: am3517.dtsi: Disable reference to OMAP3 OTG controller Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 55/79] ixgbe: Be more careful when modifying MAC filters Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 56/79] packet: reset network header if packet shorter than ll reserved space Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 57/79] qlogic: check kstrtoul() for errors Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 58/79] tcp: remove DELAYED ACK events in DCTCP Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 59/79] drm/nouveau/gem: off by one bugs in nouveau_gem_pushbuf_reloc_apply() Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 60/79] net/ethernet/freescale/fman: fix cross-build error Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 61/79] net: usb: rtl8150: demote allmulti message to dev_dbg() Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 62/79] net: qca_spi: Avoid packet drop during initial sync Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 63/79] net: qca_spi: Make sure the QCA7000 reset is triggered Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 64/79] net: qca_spi: Fix log level if probe fails Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 66/79] staging: android: ion: check for kref overflow Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 67/79] KVM: irqfd: fix race between EPOLLHUP and irq_bypass_register_consumer Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 68/79] ext4: fix spectre gadget in ext4_mb_regular_allocator() Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 70/79] xfrm_user: prevent leaking 2 bytes of kernel memory Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 71/79] netfilter: conntrack: dccp: treat SYNC/SYNCACK as invalid if no prior state Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 72/79] packet: refine ring v3 block size test to hold one frame Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 75/79] PCI: hotplug: Dont leak pci_slot on registration failure Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 76/79] PCI: Skip MPS logic for Virtual Functions (VFs) Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 77/79] PCI: pciehp: Fix use-after-free on unplug Greg Kroah-Hartman
2018-08-23 7:53 ` [PATCH 4.4 79/79] reiserfs: fix broken xattr handling (heap corruption, bad retval) Greg Kroah-Hartman
2018-08-23 16:30 ` [PATCH 4.4 00/79] 4.4.152-stable review Guenter Roeck
2018-08-23 16:56 ` Greg Kroah-Hartman
2018-08-23 17:21 ` Guenter Roeck
2018-08-23 20:52 ` Greg Kroah-Hartman
2018-08-23 19:19 ` Shuah Khan
2018-08-23 20:10 ` Guenter Roeck
2018-08-24 5:58 ` Naresh Kamboju
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=20180823074920.027247953@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.levin@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.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;
as well as URLs for NNTP newsgroup(s).