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]
Message-ID: <aYWw8Th89QwHAuyT@google.com>
Date: Fri, 6 Feb 2026 09:14:25 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Johan Hovold <johan@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J . Wysocki" <rafael@...nel.org>,
	Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>,
	Linus Walleij <linusw@...nel.org>, Jonathan Corbet <corbet@....net>,
	Shuah Khan <shuah@...nel.org>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Wolfram Sang <wsa+renesas@...g-engineering.com>,
	Simona Vetter <simona.vetter@...ll.ch>,
	Dan Williams <dan.j.williams@...el.com>,
	Jason Gunthorpe <jgg@...dia.com>, linux-doc@...r.kernel.org,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] Revert "revocable: Revocable resource management"

On Thu, Feb 05, 2026 at 12:56:47PM +0100, Danilo Krummrich wrote:
> should be
> 
> 	int revocable_init(struct revocable_provider __rcu **_rp, ...)
> 
> instead of
> 
> 	int revocable_init(struct revocable_provider __rcu *_rp, ...)
> 
> for the same reason revocable_provider_revoke() takes a double pointer.
> 
> Otherwise this seems racy:
> 
> 	int revocable_init(struct revocable_provider __rcu *_rp, struct revocable *rev)
> 	{
> 		struct revocable_provider *rp;
> 
> 		if (!_rp)
> 			return -ENODEV;
> 
> 		/*
> 		 * If revocable_provider_revoke() is called concurrently at this
> 		 * point, _rp is not affectd by rcu_replace_pointer().
> 		 *
> 		 * Additionally, nothing prevents a concurrent kfree_rcu() from
> 		 * freeing the revocable provider before we enter the RCU
> 		 * read-side critical section below.
> 		 */
> 
> 		/*
> 		 * Enter a read-side critical section.
> 		 *
> 		 * This prevents kfree_rcu() from freeing the struct revocable_provider
> 		 * memory, for the duration of this scope.
> 		 */
> 		scoped_guard(rcu) {
> 
> 		...
> 	}
> 
> Do I miss anything?

You're right.  Will fix that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ