[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210921053956.11ac7156@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 21 Sep 2021 05:39:56 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Andrew Lunn <andrew@...n.ch>, Ariel Elior <aelior@...vell.com>,
Bin Luo <luobin9@...wei.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Coiby Xu <coiby.xu@...il.com>,
Derek Chickles <dchickles@...vell.com>, drivers@...sando.io,
Felix Manlunas <fmanlunas@...vell.com>,
Florian Fainelli <f.fainelli@...il.com>,
Geetha sowjanya <gakula@...vell.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
GR-everest-linux-l2@...vell.com, GR-Linux-NIC-Dev@...vell.com,
hariprasad <hkelam@...vell.com>,
Ido Schimmel <idosch@...dia.com>,
intel-wired-lan@...ts.osuosl.org,
Ioana Ciornei <ioana.ciornei@....com>,
Jerin Jacob <jerinj@...vell.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Jiri Pirko <jiri@...dia.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Linu Cherian <lcherian@...vell.com>,
linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-staging@...ts.linux.dev,
Manish Chopra <manishc@...vell.com>,
Michael Chan <michael.chan@...adcom.com>,
netdev@...r.kernel.org, oss-drivers@...igine.com,
Richard Cochran <richardcochran@...il.com>,
Saeed Mahameed <saeedm@...dia.com>,
Salil Mehta <salil.mehta@...wei.com>,
Satanand Burla <sburla@...vell.com>,
Shannon Nelson <snelson@...sando.io>,
Simon Horman <simon.horman@...igine.com>,
Subbaraya Sundeep <sbhatta@...vell.com>,
Sunil Goutham <sgoutham@...vell.com>,
Taras Chornyi <tchornyi@...vell.com>,
Tariq Toukan <tariqt@...dia.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
UNGLinuxDriver@...rochip.com, Vadym Kochan <vkochan@...vell.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Yisen Zhuang <yisen.zhuang@...wei.com>
Subject: Re: [PATCH net-next] devlink: Make devlink_register to be void
On Tue, 21 Sep 2021 05:19:06 +0300 Leon Romanovsky wrote:
> On Mon, Sep 20, 2021 at 02:04:07PM -0700, Jakub Kicinski wrote:
> > On Mon, 20 Sep 2021 13:39:15 -0700 Jakub Kicinski wrote:
> > > On Mon, 20 Sep 2021 17:41:44 +0300 Leon Romanovsky wrote:
> [...]
> > >
> > > Unlike unused functions bringing back error handling may be
> > > non-trivial. I'd rather you deferred such cleanups until you're
> > > ready to post your full rework and therefore give us some confidence
> > > the revert will not be needed.
> >
> > If you disagree you gotta repost, new devlink_register call got added
> > in the meantime.
>
> This is exactly what I afraid, new devlink API users are added faster
> than I can cleanup them.
>
> For example, let's take a look on newly added ipc_devlink_init(), it is
> called conditionally "if (stage == IPC_MEM_EXEC_STAGE_BOOT) {". How can
> it be different stage if we are in driver .probe() routine?
>
> They also introduced devlink_sio.devlink_read_pend and
> devlink_sio.read_sem to protect from something that right position of
> devlink_register() will fix. I also have serious doubts that their
> current protection is correct, once they called to devlink_params_publish()
> the user can crash the system, because he can access the parameters before
> they initialized their protection.
>
> So yes, I disagree. We will need to make sure that devlink_register()
> can't fail and it will make life easier for everyone (no need to unwind)
> while we put that command being last in probe sequence.
Remains to be seen if return type makes people follow correct ordering.
> If I repost, will you take it? I don't want to waste anyone time if it
> is not.
Yeah, go for it.
Powered by blists - more mailing lists