Netdev List
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
To: b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org
Cc: Marek Lindner
	<mareklindner-rVWd3aGhH2z5bpWLKbzFeg@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Antonio Quartulli <a@unstable.cc>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Aditya Pakki <pakki001-OJFnDUYgAso@public.gmane.org>,
	kjlu-OJFnDUYgAso@public.gmane.org,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: Re: [PATCH] batman-adv/main: Fix check on return value of rtnl_link_register
Date: Mon, 24 Dec 2018 19:43:07 +0100	[thread overview]
Message-ID: <4059540.uxCivL65nk@sven-edge> (raw)
In-Reply-To: <20181224174926.20321-1-pakki001-OJFnDUYgAso@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

On Monday, 24 December 2018 18.49.26 CET Aditya Pakki wrote:
[...]
> diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
> index 69c0d85bceb3..e0007f242823 100644
> --- a/net/batman-adv/main.c
> +++ b/net/batman-adv/main.c
> @@ -109,7 +109,10 @@ static int __init batadv_init(void)
>  	batadv_debugfs_init();
>  
>  	register_netdevice_notifier(&batadv_hard_if_notifier);
> -	rtnl_link_register(&batadv_link_ops);
> +	ret = rtnl_link_register(&batadv_link_ops);
> +	if (ret < 0)
> +		return ret;
> +
>  	batadv_netlink_register();

Uhm, but shouldn't the already initialized parts be unregistered/uninitialized 
in this case?

Rejecting this patch because this could cause a new bug.

Also "Fixes: " line is missing

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2018-12-24 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-24 17:49 [PATCH] batman-adv/main: Fix check on return value of rtnl_link_register Aditya Pakki
     [not found] ` <20181224174926.20321-1-pakki001-OJFnDUYgAso@public.gmane.org>
2018-12-24 18:43   ` Sven Eckelmann [this message]
2018-12-24 18:46   ` Sven Eckelmann

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=4059540.uxCivL65nk@sven-edge \
    --to=sven-kadoipu9uxwei8dpzvb4nw@public.gmane.org \
    --cc=a@unstable.cc \
    --cc=b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=kjlu-OJFnDUYgAso@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mareklindner-rVWd3aGhH2z5bpWLKbzFeg@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pakki001-OJFnDUYgAso@public.gmane.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