mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-um@lists.infradead.org
Cc: Arnd Bergmann <arnd@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] um: time-travel/signals: fix ndelay() in interrupt
Date: Thu, 25 Feb 2021 14:13:33 +0100	[thread overview]
Message-ID: <96d1f031409d87ff91582eb5b3c1db5af9832bf9.camel@sipsolutions.net> (raw)
In-Reply-To: <20210223161449.7461e0b6dacc.I3507b456d425cb95a092eb50b6cb491fe8575c50@changeid>

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


  reply	other threads:[~2021-02-25 13:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 15:27 [PATCH 0/7] PCI support for UML Johannes Berg
2021-02-23 15:27 ` [PATCH 1/7] um: allow disabling NO_IOMEM Johannes Berg
2021-02-23 15:44   ` Geert Uytterhoeven
2021-02-23 15:46     ` Johannes Berg
2021-02-23 15:27 ` [PATCH 2/7] lib: add iomem emulation (logic_iomem) Johannes Berg
2021-02-23 15:27 ` [PATCH 3/7] um: remove unused smp_sigio_handler() declaration Johannes Berg
2021-02-23 15:27 ` [PATCH 4/7] um: time-travel/signals: fix ndelay() in interrupt Johannes Berg
2021-02-25 13:13   ` Johannes Berg [this message]
2021-02-23 15:27 ` [PATCH 5/7] um: irqs: allow invoking time-travel handler multiple times Johannes Berg
2021-02-23 15:27 ` [PATCH 6/7] um: add PCI over virtio emulation driver Johannes Berg
2021-02-23 15:27 ` [PATCH 7/7] um: virtio/pci: enable suspend/resume Johannes Berg
2021-02-23 21:24 ` [PATCH 0/7] PCI support for UML Johannes Berg
2021-02-24  9:47   ` Geert Uytterhoeven
2021-02-24 14:35     ` Johannes Berg

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=96d1f031409d87ff91582eb5b3c1db5af9832bf9.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arnd@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.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

all inboxes | Powered by JetHome®