lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Jan 2023 07:27:00 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] ezchip: Switch to some devm_ function to
 simplify code

Le 05/01/2023 à 05:54, Jakub Kicinski a écrit :
> On Wed,  4 Jan 2023 22:05:33 +0100 Christophe JAILLET wrote:
>> devm_alloc_etherdev() and devm_register_netdev() can be used to simplify
>> code.
>>
>> Now the error handling path of the probe and the remove function are
>> useless and can be removed completely.
> 
> Right, but this is very likely a dead driver. Why invest in refactoring?
> 

Hi Jakub,

this driver was just randomly picked as an example.

My main point is in the cover letter. I look for feed-back to know if 
patches like that are welcomed. Only the first, Only the second, Both or 
None.


I put it here, slightly rephrased:


These patches (at least 1 and 2) can be seen as an RFC for net 
MAINTAINERS, to see if there is any interest in:
   - axing useless netif_napi_del() calls, when free_netdev() is called 
just after. (patch 1)
   - simplifying code with axing the error handling path of the probe 
and the remove function in favor of using devm_ functions (patch 2)

   or

if it doesn't worth it and would only waste MAINTAINERS' time to review 
what is in fact only code clean-ups.


The rational for patch 1 is based on Jakub's comment [1].
free_netdev() already cleans up NAPIs (see [2]).

CJ

[1]: https://lore.kernel.org/all/20221221174043.1191996a@kernel.org/
[2]: https://elixir.bootlin.com/linux/v6.2-rc1/source/net/core/dev.c#L10710

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ