lkml.org 
[lkml]   [2021]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/7] um: time-travel/signals: fix ndelay() in interrupt
From
Date
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

\
 
 \ /
  Last update: 2021-02-25 14:15    [W:0.134 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site