Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp266841imu; Thu, 20 Dec 2018 21:57:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN5DKgpIIBIHFEAmOez4jewBApcBHDJfmTQgYi4c7YjSYA+HvR9mpwGJVBEfpVhSgbJ5fB9J X-Received: by 2002:a63:f74f:: with SMTP id f15mr1140378pgk.190.1545371821876; Thu, 20 Dec 2018 21:57:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545371821; cv=none; d=google.com; s=arc-20160816; b=gmw/ejplpuu7WTutdtwu3ALsKMdl/Aj2AO39+zjdxnKbLt6UP7dblWLIcCcwNcMLPV ZPjf0UfEmdo9XFgNqoi97WxK68ttJMorC9wZOX6jod6FgFADLDcblsLS30fRFNWqfe33 DTuL+7fuEqs5a1AKZa1vnrKYof00Mjj45ClwaRy+y3Vj5GprwSunfcpcXd/RtnzdkikD GRASHARyR7rRkHZlhqC/0DTa6ue24bN/k6iF8VVqI1swdJSGDhtwHbpAoJHfaRJ+JDAS LZd1Rj7Y77gQR5RPohQ0tISCO32cnoh2oYHKjDPt1mXJyGnzUMEWWom+WtvmUludsoEj WVBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=D0CgEyZntyt+8mpiUCyNIFZpAVsYEypAXqwR6P/rBQk=; b=lsnkYyjTsW4CuUqEMcejXP12oz/A7PQ4UlCF1rdAVMpeGlWmZF2DoZAJXPUqCvOjok lECLBUqLOE+z9q2AEmiiqbNojIczwxcrX4V7kB/G2er21ekTZ3w3EDAM6amMw8JAkwGQ dRmfz4W1SsU1bvrorh6QD7XTO43FH/eM5aGZfXy3A3MGzWCVE8IegRAgmZrabh5x/4ak YefrHvdDpOkwzUOYOFYnFyqznrP6GYvvzWatnAi0I89iRe9moY05Gb261uOrphrNYG8w 9EIdbUxaHHI287h5V0NByC2w15nlcT1TKP1bFwknnw2t3Se80AvBW2sEtmpwdwLTc6IK Al+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=LorXMnM2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g187si20465157pfc.43.2018.12.20.21.56.46; Thu, 20 Dec 2018 21:57:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=LorXMnM2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387836AbeLTSpt (ORCPT + 99 others); Thu, 20 Dec 2018 13:45:49 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:38494 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730779AbeLTSpt (ORCPT ); Thu, 20 Dec 2018 13:45:49 -0500 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id EC90710C077C; Thu, 20 Dec 2018 10:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1545331548; bh=+ERcZePNK455JOPXp+ZcSDyrH72ZZlwmHqmUQ9/dDoA=; h=From:To:CC:Subject:Date:References:From; b=LorXMnM2xmOl89Uu6iC91MVyxlGM0dP7483O708zNiPb23CQ7nfjiy0LBNdbfqrP3 OqTGwpnRO5PW9TqjWGj09mx0FuxqIoNw81ayDvBGEmx08d1OYfrVB4Pf4rCZKEdlDX rrHdD4GO2SZzc7RMkL6I4sm3H1kB9y0AUzY/2HIdjbpZtrmnKv5B9FEqsT7W0sro/S LLm6dG2VzGGyitCon0MdviCbb9Pa0163ua4zizO+y8wzNYUhr/w/SpLWonK3Jgr9O0 SdT4YNx1cHSnac47GfG/823O8NSnQaRFarw6bhm7QA8pMnWFyRHIVNgvzQh3E6GErP Xem5+axSMFmFg== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id D21CF55F5; Thu, 20 Dec 2018 10:45:48 -0800 (PST) Received: from US01WEMBX2.internal.synopsys.com ([fe80::e4b6:5520:9c0d:250b]) by us01wehtc1.internal.synopsys.com ([::1]) with mapi id 14.03.0415.000; Thu, 20 Dec 2018 10:45:48 -0800 From: Vineet Gupta To: Michal Hocko CC: "linux-snps-arc@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-arch@vger.kernel.org" , Peter Zijlstra Subject: Re: [PATCH 2/2] ARC: show_regs: fix lockdep splat for good Thread-Topic: [PATCH 2/2] ARC: show_regs: fix lockdep splat for good Thread-Index: AQHUlwMTcvVhAsUv7ki7z5FuF+I3DA== Date: Thu, 20 Dec 2018 18:45:48 +0000 Message-ID: References: <1545159239-30628-1-git-send-email-vgupta@synopsys.com> <1545159239-30628-3-git-send-email-vgupta@synopsys.com> <20181220130450.GB17350@dhcp22.suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.144.199.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/20/18 5:04 AM, Michal Hocko wrote:=0A= > On Tue 18-12-18 10:53:59, Vineet Gupta wrote:=0A= >> signal handling core calls ARCH show_regs() with preemption disabled=0A= >> which causes __might_sleep functions such as mmput leading to lockdep=0A= >> splat. Workaround by re-enabling preemption temporarily.=0A= >>=0A= >> This may not be as bad as it sounds since the preemption disabling=0A= >> itself was introduced for a supressing smp_processor_id() warning in x86= =0A= >> code by commit 3a9f84d354ce ("signals, debug: fix BUG: using=0A= >> smp_processor_id() in preemptible code in print_fatal_signal()")=0A= > The commit you are referring to here sounds dubious in itself.=0A= =0A= Indeed that was my thought as well, but it did introduce the preemption dis= abling=0A= logic aroung core calling show_regs() !=0A= =0A= > We do not=0A= > want to stick a preempt_disable just to silence a warning.=0A= =0A= I presume you are referring to original commit, not my anti-change in ARC c= ode,=0A= which is actually re-enabling it.=0A= =0A= > show_regs is=0A= > called from preemptible context at several places (e.g. __warn).=0A= =0A= Right, but do we have other reports which show this, perhaps not too many d= istros=0A= have CONFIG__PREEMPT enabled ?=0A= =0A= > Maybe=0A= > this was not the case in 2009 when the change was introduced but this=0A= > seems like a relict from the past. So can we fix the actual problem=0A= > rather than build on top of it instead?=0A= =0A= The best/correct fix is to remove the preempt diabling in core code, but th= at=0A= affects every arch out there and will likely trip dormant land mines, neede= d=0A= localized fixes like I'm dealing with now.=0A= =0A= -Vineet=0A=