From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34640 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406AbeBWLLo (ORCPT ); Fri, 23 Feb 2018 06:11:44 -0500 Subject: Patch "locking/lockdep: Fix possible NULL deref" has been added to the 4.14-stable tree To: peterz@infradead.org, alexander.levin@verizon.com, dvyukov@google.com, gregkh@linuxfoundation.org, mingo@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org Cc: , From: Date: Fri, 23 Feb 2018 12:10:37 +0100 Message-ID: <1519384237193226@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled locking/lockdep: Fix possible NULL deref to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: locking-lockdep-fix-possible-null-deref.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Feb 23 11:45:09 CET 2018 From: Peter Zijlstra Date: Wed, 6 Dec 2017 17:32:47 +0100 Subject: locking/lockdep: Fix possible NULL deref From: Peter Zijlstra [ Upstream commit 5e351ad106997e06b2dc3da9c6b939b95f67fb88 ] We can't invalidate xhlocks when we've not yet allocated any. Reported-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: f52be5708076 ("locking/lockdep: Untangle xhlock history save/restore from task independence") Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- kernel/locking/lockdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -4777,7 +4777,8 @@ void lockdep_invariant_state(bool force) * Verify the former, enforce the latter. */ WARN_ON_ONCE(!force && current->lockdep_depth); - invalidate_xhlock(&xhlock(current->xhlock_idx)); + if (current->xhlocks) + invalidate_xhlock(&xhlock(current->xhlock_idx)); } static int cross_lock(struct lockdep_map *lock) Patches currently in stable-queue which might be from peterz@infradead.org are queue-4.14/locking-lockdep-fix-possible-null-deref.patch queue-4.14/mm-early_ioremap-fix-boot-hang-with-earlyprintk-efi-keep.patch queue-4.14/perf-fix-header.size-for-namespace-events.patch queue-4.14/perf-annotate-do-not-truncate-instruction-names-at-6-chars.patch queue-4.14/x86-mm-kmmio-fix-mmiotrace-for-page-unaligned-addresses.patch