All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Jessica Yu <jeyu@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	jikos@kernel.org, mbenes@suse.cz, Petr Mladek <pmladek@suse.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Robert Richter <rric@kernel.org>, rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>, Martin KaFai Lau <kafai@fb.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	paulmck <paulmck@linux.ibm.com>,
	"Joel Fernandes, Google" <joel@joelfernandes.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	oprofile-list@lists.sf.net, netdev <netdev@vger.kernel.org>,
	bpf@vger.kernel.org
Subject: Re: [PATCH 2/3] module: Fix up module_notifier return values.
Date: Tue, 25 Jun 2019 09:42:14 +0200	[thread overview]
Message-ID: <20190625074214.GR3436@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190624205810.GD26422@redhat.com>

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.

  reply	other threads:[~2019-06-25  7:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  9:18 [PATCH 0/3] Propagate module notifier errors Peter Zijlstra
2019-06-24  9:18 ` [PATCH 1/3] notifier: Fix broken error handling pattern Peter Zijlstra
2019-06-24 22:21   ` Josh Poimboeuf
2019-06-25  7:38     ` Peter Zijlstra
2019-06-25 12:13       ` Josh Poimboeuf
2019-06-25 13:22         ` Peter Zijlstra
2019-06-24  9:18 ` [PATCH 2/3] module: Fix up module_notifier return values Peter Zijlstra
2019-06-24 14:01   ` Mathieu Desnoyers
2019-06-24 15:52     ` Joel Fernandes
2019-06-24 17:50       ` Mathieu Desnoyers
2019-06-24 20:58     ` Frank Ch. Eigler
2019-06-25  7:42       ` Peter Zijlstra [this message]
2019-07-04 12:48         ` Robert Richter
2019-07-04 12:34   ` Robert Richter
2019-06-24  9:18 ` [PATCH 3/3] module: Properly propagate MODULE_STATE_COMING failure Peter Zijlstra
2019-06-24 11:07   ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190625074214.GR3436@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=fche@redhat.com \
    --cc=jeyu@kernel.org \
    --cc=jikos@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=jpoimboe@redhat.com \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mbenes@suse.cz \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oprofile-list@lists.sf.net \
    --cc=paulmck@linux.ibm.com \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=rric@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=tglx@linutronix.de \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.