Netdev List
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: netdev@vger.kernel.org
Cc: Minhong He <heminhong@kylinos.cn>
Subject: Re: [PATCH] phonet: check register_netdevice_notifier() error in phonet_device_init()
Date: Mon, 13 Jul 2026 22:22:56 +0300	[thread overview]
Message-ID: <3425812.44csPzL39Z@basile.remlab.net> (raw)
In-Reply-To: <20260713075212.431455-1-heminhong@kylinos.cn>

Le maanantaina 13. heinäkuuta 2026, 10.52.12 Itä-Euroopan kesäaika Minhong He 
a écrit :
> phonet_device_init() registers a netdevice notifier before calling
> phonet_netlink_register(), but does not check whether notifier
> registration succeeded. On failure, netlink setup still proceeds and
> init may return success without the notifier in place.

> Check the notifier registration error and unwind through
> phonet_device_exit() on failure.

That will unregister a notifier that is not registered. While I believe that 
would fail safe, I am not sure if that is really considered proper by 
contemporary kernel coding standards.

-- 
Rémi Denis-Courmont
https://www.remlab.net/




      reply	other threads:[~2026-07-14 17:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13  7:52 [PATCH] phonet: check register_netdevice_notifier() error in phonet_device_init() Minhong He
2026-07-13 19:22 ` Rémi Denis-Courmont [this message]

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=3425812.44csPzL39Z@basile.remlab.net \
    --to=remi@remlab.net \
    --cc=heminhong@kylinos.cn \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox