diff options
author | Luis Henriques <[email protected]> | 2024-01-30 10:13:44 +0000 |
---|---|---|
committer | Jarkko Sakkinen <[email protected]> | 2024-05-09 16:28:58 +0300 |
commit | 9578e327b2b4935a25d49e3891b8fcca9b6c10c6 (patch) | |
tree | 5b61b324bd79925ebcc6cae2139a4b81a084bd0e /scripts/gdb/linux/modules.py | |
parent | 45db3ab70092637967967bfd8e6144017638563c (diff) |
keys: update key quotas in key_put()
Delaying key quotas update when key's refcount reaches 0 in key_put() has
been causing some issues in fscrypt testing, specifically in fstest
generic/581. This commit fixes this test flakiness by dealing with the
quotas immediately, and leaving all the other clean-ups to the key garbage
collector.
This is done by moving the updates to the qnkeys and qnbytes fields in
struct key_user from key_gc_unused_keys() into key_put(). Unfortunately,
this also means that we need to switch to the irq-version of the spinlock
that protects these fields and use spin_lock_{irqsave,irqrestore} in all
the code that touches these fields.
Signed-off-by: Luis Henriques <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Acked-by: David Howells <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions