mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: syzbot 
	<bot+2e39c7a45268c036c9e90433a48c9dd550276dc6@syzkaller.appspotmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	syzkaller-bugs@googlegroups.com
Subject: Re: general protection fault in lockdep_invariant_state (2)
Date: Wed, 8 Nov 2017 09:40:31 +0100	[thread overview]
Message-ID: <20171108084031.GX3165@worktop.lehotels.local> (raw)
In-Reply-To: <CACT4Y+ZPe+VhGOM-5sbsfrYSuhEh=+EO6Jo2Y=FxBcp0iCW45g@mail.gmail.com>

On Wed, Nov 08, 2017 at 09:19:53AM +0100, Dmitry Vyukov wrote:

> > R13: 0000000000402260 R14: 00000000004022f0 R15: 0000000000000000
> > kasan: CONFIG_KASAN_INLINE enabled
> > kasan: GPF could be caused by NULL-ptr deref or user memory access
> > general protection fault: 0000 [#1] SMP KASAN
> > Dumping ftrace buffer:
> >    (ftrace buffer empty)
> > Modules linked in:
> > CPU: 3 PID: 2982 Comm: syzkaller521009 Not tainted 4.14.0-rc7-next-20171103+
> > #10
> > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
> > task: ffff88003d6b25c0 task.stack: ffff88003abd0000
> > RIP: 0010:invalidate_xhlock kernel/locking/lockdep.c:4719 [inline]
> > RIP: 0010:lockdep_invariant_state+0xd6/0x120 kernel/locking/lockdep.c:4793


Does this help?

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index db933d063bfc..da2904418599 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4793,7 +4793,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)

  reply	other threads:[~2017-11-08  8:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08  8:16 syzbot
2017-11-08  8:19 ` Dmitry Vyukov
2017-11-08  8:40   ` Peter Zijlstra [this message]
2017-11-20 13:28     ` Dmitry Vyukov
2017-11-29 12:00       ` Dmitry Vyukov
2017-12-06 15:54         ` Dmitry Vyukov
2017-12-06 16:30           ` Peter Zijlstra
2017-12-06 16:31             ` Dmitry Vyukov
2017-12-07  8:07               ` Dmitry Vyukov
2018-01-27  1:28 ` Eric Biggers

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=20171108084031.GX3165@worktop.lehotels.local \
    --to=peterz@infradead.org \
    --cc=bot+2e39c7a45268c036c9e90433a48c9dd550276dc6@syzkaller.appspotmail.com \
    --cc=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=syzkaller-bugs@googlegroups.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

all inboxes | Powered by JetHome®