locking/lockdep: Fix possible NULL deref
authorPeter Zijlstra <peterz@infradead.org>
Wed, 6 Dec 2017 16:32:47 +0000 (17:32 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Dec 2017 18:29:56 +0000 (19:29 +0100)
commit5e351ad106997e06b2dc3da9c6b939b95f67fb88
treec3f2ca916c260a9abc2b92a2d528ab093a4a4878
parent328b4ed93b69a6f2083d52f31a240a09e5de386a
locking/lockdep: Fix possible NULL deref

We can't invalidate xhlocks when we've not yet allocated any.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Fixes: f52be5708076 ("locking/lockdep: Untangle xhlock history save/restore from task independence")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/locking/lockdep.c