From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752127AbdLFWOD (ORCPT ); Wed, 6 Dec 2017 17:14:03 -0500 Received: from mail-wr0-f181.google.com ([209.85.128.181]:35365 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbdLFWOB (ORCPT ); Wed, 6 Dec 2017 17:14:01 -0500 X-Google-Smtp-Source: AGs4zMZOhVXaq3taM3v0guh8tFsUVtvkGvYwTvsFHedcnOw3BxYb/W9vCx6bv609rd7TqaHbPExibQ== Date: Wed, 6 Dec 2017 23:13:53 +0100 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , Andrew Morton Subject: [GIT PULL] lockdep fix Message-ID: <20171206221353.fwretijt47hw3udi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, Please pull the latest locking-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-for-linus # HEAD: 5e351ad106997e06b2dc3da9c6b939b95f67fb88 locking/lockdep: Fix possible NULL deref Fix a possible NULL dereference for the (rare) case when a task doesn't have ->xhlocks space allocated due to kmalloc() OOM-ing. Thanks, Ingo ------------------> Peter Zijlstra (1): locking/lockdep: Fix possible NULL deref kernel/locking/lockdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 9776da8db180..670d8d7d8087 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -4790,7 +4790,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)