Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3355979ybd; Tue, 25 Jun 2019 00:53:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+AqOBu+RzM9J9qYKRXpVGxI4o3YBh+Y7vQOzAdJacvLgc4feuERthtsZtzWX1J98yCSqN X-Received: by 2002:a63:7a4f:: with SMTP id j15mr388023pgn.427.1561449221154; Tue, 25 Jun 2019 00:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561449221; cv=none; d=google.com; s=arc-20160816; b=Zh7v6v4AJJDnrfKB3XrSbRwmr7j1sLFYJnEAxjRp/klctwwpIa2i4bTZjOJfu1SQX8 VbX3JTyJVxWE+1wuSkGH3vrtuCodyasPuAljRAabdblHedF0OKMus+mvOI45OTiIB4Dq 1MMi3OmBCeIjWF0Gm1lAIjVxdAO2uEH0S5OPUvKtmdHShdFjh+6KBRSeAKxlfvYanpPf cdkP+QwoAAvvzMACV+VCJfwDlBlprtYUvV7YWLEcMfBuyDhDqYfA6KQ0uGad2fldvyXd h9TqkMFWFwMO/o1kaNC/uKJikf+QO4tbhXiq6Mci632bITk5d66eoF7Y5kIB7ZDS6fOR i/JQ== 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:dkim-signature; bh=3Woq6Ijx79j2u1qvlhauxGczuuE2pOnfE5TxDoYwUlo=; b=f9xxVSMoagwCsdcULrtqmiHR2Vz1g9SWWh1V/dPq4XproJJyIyXFuOV+8pvViGINQ4 hKRdZrWpf6eZwKEUuknxCaQLhKkJ3bPGY7PbaXxDzQlyLp1e5ExEcpn1L2xHBtu3LLFI zRFMAETKkGVNVyGqubmefVakJK8U9GQX2hedzoQVnYRzYKrPQbz6KrdOxVLaT/J5YL+k 4F4XR/DGA8xrVm7SejAqwR6iXBOxswzc+ggJiELCkCJnsW6Bb1My73zoMYi0sjFqIGu6 ghJWkE4iq2T/4afgx9Fo6pFuWxefIYqbBPsYc5VmpF0x0QUuUxmj57eOk54bPhUpRtx8 jeuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ZOsUs5qS; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si12632784pgb.104.2019.06.25.00.53.25; Tue, 25 Jun 2019 00:53:41 -0700 (PDT) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ZOsUs5qS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729055AbfFYHnB (ORCPT + 99 others); Tue, 25 Jun 2019 03:43:01 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54378 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726668AbfFYHnA (ORCPT ); Tue, 25 Jun 2019 03:43:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3Woq6Ijx79j2u1qvlhauxGczuuE2pOnfE5TxDoYwUlo=; b=ZOsUs5qSf57Dj/Pk5RYzsxw59 UEljXgjEtZQvU9qf0h/H8kknIf7OPGmcSz8smyBFHiroy9ujI8Qo/4ckFOQzdG/uelI5b6DAirzy6 Deq5BLpWD9gsZsC0HfxvFd9u8xeHoKc6t3lE8UHCjzBetzSIdrTiNTZOKyfN2taQgp8CnXLEEPpno 0etHTcBjiIS3jz8xF40mDJIRn+dWXflSvl2dS9xAZScTCCvOTPrjD3oiNkgdt4nCj1//4PCBe4A8i DbOAA+hulLsM7sGPx247bRBzMA47vpqf9vhJRSSqMrJxqdq+acP818QPbjp1s4nSdOzxTUwQMULTc KwuD+LPhA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hfg5n-0002my-Rq; Tue, 25 Jun 2019 07:42:16 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7C1BA20A0642F; Tue, 25 Jun 2019 09:42:14 +0200 (CEST) Date: Tue, 25 Jun 2019 09:42:14 +0200 From: Peter Zijlstra To: "Frank Ch. Eigler" Cc: Mathieu Desnoyers , Jessica Yu , linux-kernel , Josh Poimboeuf , jikos@kernel.org, mbenes@suse.cz, Petr Mladek , Alexei Starovoitov , Daniel Borkmann , Andrew Morton , Robert Richter , rostedt , Ingo Molnar , Martin KaFai Lau , Song Liu , Yonghong Song , paulmck , "Joel Fernandes, Google" , Ard Biesheuvel , Thomas Gleixner , oprofile-list@lists.sf.net, netdev , bpf@vger.kernel.org Subject: Re: [PATCH 2/3] module: Fix up module_notifier return values. Message-ID: <20190625074214.GR3436@hirez.programming.kicks-ass.net> References: <20190624091843.859714294@infradead.org> <20190624092109.805742823@infradead.org> <320564860.243.1561384864186.JavaMail.zimbra@efficios.com> <20190624205810.GD26422@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190624205810.GD26422@redhat.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 Mon, Jun 24, 2019 at 04:58:10PM -0400, Frank Ch. Eigler wrote: > Hi - > > > > While auditing all module notifiers I noticed a whole bunch of fail > > > wrt the return value. Notifiers have a 'special' return semantics. > > From peterz's comments, the patches, it's not obvious to me how one is > to choose between 0 (NOTIFY_DONE) and 1 (NOTIFY_OK) in the case of a > routine success. I'm not sure either; what I think I choice was: - if I want to completely ignore the callback, use DONE (per the "Don't care" comment). - if we finished the notifier without error, use OK or notifier_from_errno(0). But yes, its a bit of a shit interface.