From: Jarkko Sakkinen <jarkko@kernel.org>
To: Hillf Danton <hdanton@sina.com>
Cc: David Howells <dhowells@redhat.com>,
keyrings@vger.kernel.org, Eric Biggers <ebiggers@kernel.org>,
syzbot+c15de43f1e7fffbb7b9b@syzkaller.appspotmail.com,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] KEYS: dispatch key_gc_work to system_wq.
Date: Tue, 27 Oct 2026 01:42:02 +0200 [thread overview]
Message-ID: <at_lSoqp4-2Var4S@kernel.org> (raw)
In-Reply-To: <20261026222207.1237-1-hdanton@sina.com>
On Tue, Oct 27, 2026 at 06:21:52AM +0800, Hillf Danton wrote:
> On Mon, 26 Oct 2026 19:18:57 +0200 Jarkko Sakkinen wrote:
> >On Mon, Oct 26, 2026 at 06:57:22PM +0200, Jarkko Sakkinen wrote:
> >> > --- x/security/keys/gc.c
> >> > +++ y/security/keys/gc.c
> >> > @@ -270,9 +270,8 @@ contended:
> >> >
> >> > maybe_resched:
> >> > if (cursor) {
> >> > - cond_resched();
> >> > - spin_lock(&key_serial_lock);
> >> > - goto continue_scanning;
> >> > + schedule_work(&key_gc_work);
> >> > + return;
> >> > }
> >
> >I guess I'll to elaborate my fix and this proposal as you gave feedback
> >of neither.
> >
> >What you wanted to respond to my patch other than nitpicking is probably
> >this sequence:
> >
> Nope because synchronize_rcu() has nothing to do with workqueue lockup.
>
> > key_garbage_collector()
> > synchronize_rcu()
> > synchronize_rcu_normal()
> > wait_for_completion()
> > schedule_timeout()
> > schedule()
> >
> >I should have put this to the commit message, and missed also this
> >detail.
> >
> >So the way I saw this, which could be wrong, is that the workqueue
> >lockup would could happen less often as also other threads are scheduled
> >preemptively in unbounded queue outside critical sections.
> >
> The unbound queue could also suffer lockup.
>
> >What you are doing with early return is at least not right as it
> >corrupts the state. So you should supplement that with something
>
> How?
>
> >that carries it.
> >
> Feel free to post a diff?
Actually I choose not to answer to your questions as your only
argument is "show the diff" or providing a diff without making
your case. I'm sorry but I don't get anything from this.
If you want to help, be helpful.
Br, Jarkko
next prev parent reply other threads:[~2026-10-26 23:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 3:12 [PATCH] KEYS: dispatch key_gc_work to system_wq Jarkko Sakkinen
2026-10-26 3:15 ` Jarkko Sakkinen
2026-10-26 3:20 ` Jarkko Sakkinen
2026-10-26 6:58 ` sashiko-bot
2026-10-26 9:56 ` Hillf Danton
2026-10-26 16:57 ` Jarkko Sakkinen
2026-10-26 17:18 ` Jarkko Sakkinen
2026-10-26 17:39 ` Jarkko Sakkinen
2026-10-26 22:21 ` Hillf Danton
2026-10-26 23:42 ` Jarkko Sakkinen [this message]
2026-10-26 21:58 ` Jarkko Sakkinen
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=at_lSoqp4-2Var4S@kernel.org \
--to=jarkko@kernel.org \
--cc=dhowells@redhat.com \
--cc=ebiggers@kernel.org \
--cc=hdanton@sina.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=syzbot+c15de43f1e7fffbb7b9b@syzkaller.appspotmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.