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] [day] [month] [year] [list]
Message-ID: <aKxn1bnFhFVSw3r7@smile.fi.intel.com>
Date: Mon, 25 Aug 2025 16:40:37 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: phasta@...nel.org
Cc: Zhang Heng <zhangheng@...inos.cn>, axboe@...nel.dk, broonie@...nel.org,
	lizetao1@...wei.com, viro@...iv.linux.org.uk,
	fourier.thomas@...il.com, anuj20.g@...sung.com,
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] block: mtip32xx: Prioritize state cleanup over memory
 freeing in the mtip_pci_probe error path.

On Mon, Aug 25, 2025 at 01:33:17PM +0200, Philipp Stanner wrote:
> On Sat, 2025-08-23 at 16:32 +0800, Zhang Heng wrote:

...

> So I think that the pci_set_drvdata(… NULL) can be removed
> alltogether. 
> 
> When working on the probe() / remove() paths last and this year, I came
> to believe that calls like that were often used because of a
> misunderstanding of how the driver core APIs work.

I think there are other aspects that makes this happen (any combination of them
possible):

1) old books for Linux kernel development with outdated examples (these calls
   used to be required ca. 2010);

2) initial driver development based on (quite) old examples;

3) (as you said) misunderstanding of the device enumeration process in Linux
device model;

4) ...anything else I forgot...

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ