Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3222057imu; Sat, 24 Nov 2018 00:27:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/W8Ut7ySi/Z320BrCbuRSB0YAngu0xk6he4wP9ac1cmE30pNpp+b5ABqDgsb4SVrgx74RgD X-Received: by 2002:a63:7418:: with SMTP id p24mr17294377pgc.196.1543048043231; Sat, 24 Nov 2018 00:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543048043; cv=none; d=google.com; s=arc-20160816; b=zFjJXC6/Gea2HreTjpiPuzwd4cYKzrRLK6S42/TLaHqyajM+2w/m5c3iYQl0OR98Lp MNxriFoJ0igTnDiRvX7+a4lmOR8jjZf5mySD/fkvY6HM/Q/V0uZr4tCVfP/a8TTaEQ3w KElP+30ghPwqea//EX9uhIgnB1T052Pnfi9jUUrcfsMHsU4j3k4u9G4fdwGt04o1VRcR 7BQDnKtKJCr/rrc/2cMZWrAsIgTLgYlpQcOrCunWkqRQoQMsmmQVgdcxqZnWusFpxQqL 704Vh7QdbcEseCgR869Kh4UZgPRYxr+t5eAsf03lSBuijc8juZLEv12kitTR/1NGVz73 w9Mw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=THJ/qWWm8/9LYjCmKpYN03Ge7hhcCNn188/hgywrq3k=; b=k7kfWT7mmKIrpySDFBts+nmV08y6gBxAz90il4MO7uqW2bTLD+Pack5aVxP7PDv5d9 EPCczl+AzdeRcvoe+umphkp6oeC4jBrjR6VFwvVxBHo23KRF92BebcWtgZu8vk/KM9fb uP6oAWU1azQgeEBCsl6+GerANaHL9dlx4h7+yX2oF+lCWd/Xo8wkLk8jQgaKNCBai8wK vh6kdUqGFU0KBuu5+pzy8HudYRLVsaO11rF4GZQDxMcbFO4JFxUZykrTybKAZtpk3pcf j7vKgqVRNLyKqiVsTUSxjGvrWKRH+XW8cDbnEeAJHvHqIw5hMcyfcvosoSjRps3ctaQs uMeQ== 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 v23-v6si53732979plo.182.2018.11.24.00.27.08; Sat, 24 Nov 2018 00:27:23 -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 S2394308AbeKWV7t (ORCPT + 99 others); Fri, 23 Nov 2018 16:59:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:53388 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387941AbeKWV7t (ORCPT ); Fri, 23 Nov 2018 16:59:49 -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 9B019AEA1; Fri, 23 Nov 2018 11:15:57 +0000 (UTC) Date: Fri, 23 Nov 2018 12:15:57 +0100 From: Michal Hocko To: Daniel Vetter Cc: LKML , Linux MM , Intel Graphics Development , DRI Development , Andrew Morton , Christian =?iso-8859-1?Q?K=F6nig?= , David Rientjes , =?iso-8859-1?B?Suly9G1l?= Glisse , Paolo Bonzini , Daniel Vetter Subject: Re: [PATCH 1/3] mm: Check if mmu notifier callbacks are allowed to fail Message-ID: <20181123111557.GG8625@dhcp22.suse.cz> References: <20181122165106.18238-1-daniel.vetter@ffwll.ch> <20181122165106.18238-2-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181122165106.18238-2-daniel.vetter@ffwll.ch> 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 Thu 22-11-18 17:51:04, Daniel Vetter wrote: > Just a bit of paranoia, since if we start pushing this deep into > callchains it's hard to spot all places where an mmu notifier > implementation might fail when it's not allowed to. What does WARN give you more than the existing pr_info? Is really backtrace that interesting? > Cc: Andrew Morton > Cc: Michal Hocko > Cc: "Christian K?nig" > Cc: David Rientjes > Cc: Daniel Vetter > Cc: "J?r?me Glisse" > Cc: linux-mm@kvack.org > Cc: Paolo Bonzini > Signed-off-by: Daniel Vetter > --- > mm/mmu_notifier.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c > index 5119ff846769..59e102589a25 100644 > --- a/mm/mmu_notifier.c > +++ b/mm/mmu_notifier.c > @@ -190,6 +190,8 @@ int __mmu_notifier_invalidate_range_start(struct mm_struct *mm, > pr_info("%pS callback failed with %d in %sblockable context.\n", > mn->ops->invalidate_range_start, _ret, > !blockable ? "non-" : ""); > + WARN(blockable,"%pS callback failure not allowed\n", > + mn->ops->invalidate_range_start); > ret = _ret; > } > } > -- > 2.19.1 > -- Michal Hocko SUSE Labs