Re: [PATCH v2] keys: serialise key instantiation against keyctl_chown_key()

From
Jarkko Sakkinen <jarkko@kernel.org>
Date
2026-11-17 16:23:11
Also in
keyrings, lkml, stable
Reply to
Jarkko Sakkinen, 2026-11-17
On Tue, Nov 17, 2026 at 06:21:43PM +0200, Jarkko Sakkinen wrote:
On Tue, Nov 17, 2026 at 12:34:12PM +0000, Sinan Turunc wrote:
quoted
Subclass 2 is an unused lockdep subclass that is
only ever taken inside key_construction_mutex. Subclasses 0 and 1 are
already taken outside keyring_serialise_link_lock by __key_link_lock() and
__key_move_lock().
Delete also this as there was no bug associated with nesting levels.

And this does not need additional fixes despite I forewarned about that.

I'll wait for v3.
"Take key->sem for write with down_write_nested(&key->sem, 2) inside
key_construction_mutex in __key_instantiate_and_link() and
key_reject_and_link()."

This sentence tells everything about nesting that this patch requires.

Br, Jarkko
Thread (7 messages) 7 messages, 3 authors, last reply 7h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help