[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <96d1f031409d87ff91582eb5b3c1db5af9832bf9.camel@sipsolutions.net>
Date: Thu, 25 Feb 2021 14:13:33 +0100
From: Johannes Berg <johannes@...solutions.net>
To: linux-um@...ts.infradead.org
Cc: Arnd Bergmann <arnd@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/7] um: time-travel/signals: fix ndelay() in interrupt
On Tue, 2021-02-23 at 16:27 +0100, Johannes Berg wrote:
>
> +void unblock_signals_hard(void)
> +{
> + if (!signals_blocked)
> + return;
> +
> + if (signals_pending && signals_enabled) {
> + /* this is a bit inefficient, but that's not really important */
> + block_signals();
> + unblock_signals();
> + } else if (signals_pending & SIGIO_MASK) {
> + /* we need to run time-travel handlers even if not enabled */
> + sigio_run_timetravel_handlers();
> + }
> +
> + signals_blocked = 0;
> +}
This is, of course, racy & wrong - we could set signals_pending just
after checking it.
Need to make this
{
if (!signals_blocked)
return;
signals_blocked = 0;
barrier();
if (signals_pending && signals_enabled) {
...
Anyway, I need to repost this series, but I'll wait a bit longer for
further feedback before that, since I know Arnd and others wanted to
take a look at the IOMEM and PCI bits.
johannes
Powered by blists - more mailing lists