[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6185be94-65b9-466d-ad1a-bded0e4f8356@redhat.com>
Date: Tue, 13 Aug 2024 13:55:27 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Breno Leitao <leitao@...ian.org>, kuba@...nel.org, davem@...emloft.net,
edumazet@...gle.com
Cc: thepacketgeek@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Aijay Adams <aijay@...a.com>
Subject: Re: [PATCH net-next] net: netconsole: Populate dynamic entry even if
netpoll fails
On 8/9/24 18:19, Breno Leitao wrote:> @@ -1304,8 +1308,6 @@ static int
__init init_netconsole(void)
> while ((target_config = strsep(&input, ";"))) {
> nt = alloc_param_target(target_config, count);
> if (IS_ERR(nt)) {
> - if (IS_ENABLED(CONFIG_NETCONSOLE_DYNAMIC))
> - continue;
> err = PTR_ERR(nt);
> goto fail;
> }
AFAICS the above introduces a behavior change: if
CONFIG_NETCONSOLE_DYNAMIC is enabled, and the options parsing fails for
any targets in the command line, all the targets will be removed.
I think the old behavior is preferable - just skip the targets with
wrong options.
Side note: I think the error paths in __netpoll_setup() assume the
struct netpoll will be freed in case of error, e.g. the device refcount
is released but np->dev is not cleared, I fear we could hit a reference
underflow on <setup error>, <disable>
Paolo
Powered by blists - more mailing lists