From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C9CEC48BD4 for ; Tue, 25 Jun 2019 07:43:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6379D20659 for ; Tue, 25 Jun 2019 07:43:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZOsUs5qS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729029AbfFYHnA (ORCPT ); Tue, 25 Jun 2019 03:43:00 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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.