[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8AgC99AUeMjFWKt@tycho.pizza>
Date: Thu, 12 Jan 2023 07:58:19 -0700
From: Tycho Andersen <tycho@...ho.pizza>
To: Andrei Vagin <avagin@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
Christian Brauner <brauner@...nel.org>,
Andrei Vagin <avagin@...il.com>,
Andy Lutomirski <luto@...capital.net>,
Juri Lelli <juri.lelli@...hat.com>,
Peter Oskolkov <posk@...gle.com>,
Will Drewry <wad@...omium.org>
Subject: Re: [PATCH 1/5] seccomp: don't use semaphore and wait_queue together
On Tue, Jan 10, 2023 at 01:30:06PM -0800, Andrei Vagin wrote:
> From: Andrei Vagin <avagin@...il.com>
>
> The main reason is to use new wake_up helpers that will be added in the
> following patches. But here are a few other reasons:
>
> * if we use two different ways, we always need to call them both. This
> patch fixes seccomp_notify_recv where we forgot to call wake_up_poll
> in the error path.
[snip]
> @@ -1515,7 +1546,8 @@ static long seccomp_notify_recv(struct seccomp_filter *filter,
> if (should_sleep_killable(filter, knotif))
> complete(&knotif->ready);
> knotif->state = SECCOMP_NOTIFY_INIT;
> - up(&filter->notif->request);
> + atomic_add(1, &filter->notif->requests);
> + wake_up_poll(&filter->wqh, EPOLLIN | EPOLLRDNORM);
> }
> mutex_unlock(&filter->notify_lock);
> }
I wonder if this shouldn't be a separate patch that you can send now
independent of this series?
Tycho
Powered by blists - more mailing lists