From: David Howells <dhowells@redhat.com>
To: Luis Henriques <lhenriques@suse.de>
Cc: dhowells@redhat.com, Jarkko Sakkinen <jarkko@kernel.org>,
Eric Biggers <ebiggers@kernel.org>,
keyrings@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] keys: update key quotas in key_put()
Date: Mon, 05 Feb 2024 12:04:24 +0000 [thread overview]
Message-ID: <3007646.1707134664@warthog.procyon.org.uk> (raw)
In-Reply-To: <20240130101344.28936-1-lhenriques@suse.de>
Luis Henriques <lhenriques@suse.de> wrote:
> 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.
Okay, I'll accept this.
> 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.
... Which shouldn't be that often. It only happens when a key is created or
finally let go of.
> Signed-off-by: Luis Henriques <lhenriques@suse.de>
Acked-by: David Howells <dhowells@redhat.com>
Jarkko - could you pick this up?
next prev parent reply other threads:[~2024-02-05 12:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 10:13 Luis Henriques
2024-01-30 17:27 ` Jarkko Sakkinen
2024-02-05 12:04 ` David Howells [this message]
2024-02-05 13:54 ` Luis Henriques
2024-03-13 12:37 ` Luis Henriques
2024-03-18 21:14 ` Jarkko Sakkinen
2024-03-18 21:37 ` Jarkko Sakkinen
2024-03-18 21:38 ` Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3007646.1707134664@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=ebiggers@kernel.org \
--cc=jarkko@kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=lhenriques@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome