Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp972191imu; Thu, 20 Dec 2018 08:08:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/WAHuaWg2blsGb8oM2izXrQsaMqibOPL95X+ZGgtAYYAiJptUZ1W5QScVz0CUa+jqKu/VIA X-Received: by 2002:a17:902:4c85:: with SMTP id b5mr23483913ple.226.1545322129456; Thu, 20 Dec 2018 08:08:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545322129; cv=none; d=google.com; s=arc-20160816; b=XoHHjvXDbtP7E2ESF3f1yiqc7A6xqYBnskfwbfkBnZm5ReUB8uTYPoGcLCz27QloTq 7Hc+a/Qzs0C9/oiJR/9nP8xtQM4HAAAbwKt0D6mUyIM8k1boLZlZHkH4LvCHzasPyhGa 0eCg0DD7TVD/oGgL2dVSKdHQiO8ntMJL5Stkm8jHkoYXRe1P+sywNfNLhxNju4yGpZgU 2tSHsxinY4Tm5nC6TJ2FT1h83JXeXDNxsvLJvUDdvEVWsVf8wUwpajT8aIAE0CIghfM5 AGUjbDJ7UMVgudYfKmTVC45W/IYb4MmQ+etjhLQTwa9e48osGBeJIgNey/Ew34ykiayx 4y6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3R5999YfzChRZGSG8SE4YEqJJwJ8TYsqJoqQAi12UXk=; b=F964T2NM39bT90umkl90g6twC2cq7IAahai1HouVo0MsjYmZNGDDcqc7CYVrsBQ6kS 1AsbUHkpG4syquutWYmZCXHwgLN/V5runM3zIhTFitb+KWR+M9pTu0a+JYmxP5yVL/0n /rvhd1Kw1FzrRMvXM7zh0Z8nRPBF6ptpNyH53onnh1YSvuFPe3TnndDz/24M8uEylvJL wnKr2Md3JsktfyZrG3qESLZnh26n4Ge0dTUiVcRitHRXXemgm0/Om/RW3ZXMpbmAuY8g jFfq5gJ017laqsCrHiqwiHjsEfqKZ/xlUU7cg+HnlZUs9+fACOq0V2flWPcKY5HrsFFE vcEQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si76215plq.210.2018.12.20.08.08.31; Thu, 20 Dec 2018 08:08:49 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731786AbeLTNEy (ORCPT + 99 others); Thu, 20 Dec 2018 08:04:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:34324 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728803AbeLTNEy (ORCPT ); Thu, 20 Dec 2018 08:04:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 01377ADF3; Thu, 20 Dec 2018 13:04:52 +0000 (UTC) Date: Thu, 20 Dec 2018 14:04:50 +0100 From: Michal Hocko To: Vineet Gupta 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 Message-ID: <20181220130450.GB17350@dhcp22.suse.cz> References: <1545159239-30628-1-git-send-email-vgupta@synopsys.com> <1545159239-30628-3-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1545159239-30628-3-git-send-email-vgupta@synopsys.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 18-12-18 10:53:59, Vineet Gupta wrote: > signal handling core calls ARCH show_regs() with preemption disabled > which causes __might_sleep functions such as mmput leading to lockdep > splat. Workaround by re-enabling preemption temporarily. > > This may not be as bad as it sounds since the preemption disabling > itself was introduced for a supressing smp_processor_id() warning in x86 > code by commit 3a9f84d354ce ("signals, debug: fix BUG: using > smp_processor_id() in preemptible code in print_fatal_signal()") The commit you are referring to here sounds dubious in itself. We do not want to stick a preempt_disable just to silence a warning. show_regs is called from preemptible context at several places (e.g. __warn). Maybe this was not the case in 2009 when the change was introduced but this seems like a relict from the past. So can we fix the actual problem rather than build on top of it instead? Or maybe I am just missing something here. -- Michal Hocko SUSE Labs