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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <697ad713ea124_3095100ee@dwillia2-mobl4.notmuch>
Date: Wed, 28 Jan 2026 19:42:11 -0800
From: <dan.j.williams@...el.com>
To: Jason Gunthorpe <jgg@...dia.com>, Laurent Pinchart
	<laurent.pinchart@...asonboard.com>
CC: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>, Johan Hovold
	<johan@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Danilo
 Krummrich" <dakr@...nel.org>, "Rafael J . Wysocki" <rafael@...nel.org>,
	Tzung-Bi Shih <tzungbi@...nel.org>, Linus Walleij <linusw@...nel.org>,
	Jonathan Corbet <corbet@....net>, Shuah Khan <shuah@...nel.org>, Wolfram Sang
	<wsa+renesas@...g-engineering.com>, Simona Vetter <simona.vetter@...ll.ch>,
	Dan Williams <dan.j.williams@...el.com>, <linux-doc@...r.kernel.org>,
	<linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Bartosz
 Golaszewski" <brgl@...nel.org>
Subject: Re: [PATCH 0/3] Revert "revocable: Revocable resource management"

Jason Gunthorpe wrote:
> On Thu, Jan 29, 2026 at 03:08:22AM +0200, Laurent Pinchart wrote:
> > > The latter already have robust schemes to help the driver shutdown and
> > > end the concurrent operations. ie cancel_work_sync(),
> > > del_timer_sync(), free_irq(), and *notifier_unregister().
> > 
> > One a side note, devm_request_irq() is another of the devm_* helpers
> > that cause race conditions, as interrupt handlers can run right after
> > .remove() returns, which drivers will most likely not handle correctly.
> 
> Yes! You *cannot* intermix devm and non-devm approaches without
> creating very subtle bugs exactly like this. If your subsystem does
> not provide a "devm register" helper its drivers shouldn't use devm.

I wonder if we should have a proactive debug mode that checks for
idiomatic devres usage and flags:

- registering devres actions while the driver is detached
- registering devres actions for a device with a driver that has a
  .remove() method
- passing a devres allocation to a kobject API
- invoking devres release actions from a kobject release API

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ