From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbdLFQcB (ORCPT ); Wed, 6 Dec 2017 11:32:01 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33515 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbdLFQb6 (ORCPT ); Wed, 6 Dec 2017 11:31:58 -0500 X-Google-Smtp-Source: AGs4zMYW8PdZz+LcorbM3fCtsOslNB6MDVPGhpRR207GsbGtjuGLJbFjlF+b4T6InMqIi0oFYavlptEv9h5Ozw9havI= MIME-Version: 1.0 In-Reply-To: <20171206163048.kpkgdjjt26c4baoq@hirez.programming.kicks-ass.net> References: <001a114498f6446843055d744c3a@google.com> <20171108084031.GX3165@worktop.lehotels.local> <20171206163048.kpkgdjjt26c4baoq@hirez.programming.kicks-ass.net> From: Dmitry Vyukov Date: Wed, 6 Dec 2017 17:31:35 +0100 Message-ID: Subject: Re: general protection fault in lockdep_invariant_state (2) To: Peter Zijlstra Cc: syzbot , LKML , Ingo Molnar , syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 6, 2017 at 5:30 PM, Peter Zijlstra wrote: > On Wed, Dec 06, 2017 at 04:54:17PM +0100, Dmitry Vyukov wrote: >> On Wed, Nov 29, 2017 at 1:00 PM, Dmitry Vyukov wrote: >> > On Mon, Nov 20, 2017 at 2:28 PM, 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) >> >> >> >> >> >> Hi Peter, >> >> >> >> We are not able to test all fixes for all bugs, but we are rolling out >> >> a patch testing feature for syzbot: >> >> >> >> https://github.com/google/syzkaller/blob/master/docs/syzbot.md#communication-with-syzbot >> >> >> >> Please give it a try! >> > >> > >> > Peter, ping. >> > This still happens. Please either submit the fix if you already tested >> > it, or test using syzbot and submit. >> >> >> Peter, do you want me to mail your patch? > > Urgh, sorry, got stuck doing KAISER muck. I'll go write up a proper > patch. Thanks!