From: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] IRQ handler reentrancy
Date: Fri, 20 Nov 2015 12:50:16 +0000 [thread overview]
Message-ID: <564F1708.20608@kot-begemot.co.uk> (raw)
In-Reply-To: <1a2b6b675f22380fc7e91e5e16278cb0@nixia.no>
On 20/11/15 12:26, stian@nixia.no wrote:
>>> 4. While I can propose a brutal patch for signal.c which sets guards
>>> against reentrancy which works fine, I suggest we actually get to
>>> the
>>> bottom of this. Why the code in unblock_signals() does not guard
>>> correctly against that?
>> Thanks for hunting this issue.
>> I fear I'll have to grab my speleologist's hat to figure out why UML
>> works this way.
>> Cc'ing Al, do you have an idea?
> In the few stack-traces that I have seen posted here, I could see
> multiple calls to unlocking of signals (with a signal occurred directly
> after). That probably should not happen. Do we count the number of
> timers of time we try to block/unblock signals and only actual perform
> the action when the counter reaches/leaves 0?
>
> if this series of calls happens:
> block()
> foo()
> block()
> bar()
> unblock() <- this should be a no-op
> foobar()
> unblock() <- first here the signals should be unblocked again
Block/unblock are not counting the number of enable/disable at present.
It is either on or off.
Any unblock will immediately re-trigger all pending interrupts.
Some of the errata patches I have out of investigating this do exactly
that - change:
block to flags = set_signals(0); bar() ; set_signal(flags);
This, if nested should be a NOP.
However, even after fixing all of them (and their corresponding kernel
side counterparts), I still get reentrancy, so there is something else
at play too.
In any case, the errata should be fixed, I will sort it out, organize it
into a patch set and send it out by Monday.
A.
>
>
>
> Stian
>
> ------------------------------------------------------------------------------
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
>
------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2015-11-20 12:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 12:05 [uml-devel] IRQ handler reentrancy Anton Ivanov
2015-11-20 12:16 ` Richard Weinberger
2015-11-20 12:26 ` stian
2015-11-20 12:50 ` Anton Ivanov [this message]
2015-11-20 13:48 ` stian
2015-11-20 14:08 ` Anton Ivanov
2015-11-20 15:21 ` Thomas Meyer
2015-11-20 16:22 ` Anton Ivanov
2015-11-20 16:43 ` Anton Ivanov
2015-11-20 12:45 ` Anton Ivanov
2015-11-24 17:00 ` Anton Ivanov
2015-12-10 22:40 ` Richard Weinberger
2015-12-11 6:58 ` Anton Ivanov
2015-12-11 8:16 ` Richard Weinberger
2015-12-11 11:24 ` Anton Ivanov
2015-12-11 18:38 ` Richard Weinberger
2015-12-11 19:12 ` Anton Ivanov
2015-12-21 11:55 ` Anton Ivanov
2016-01-10 15:53 ` Richard Weinberger
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=564F1708.20608@kot-begemot.co.uk \
--to=anton.ivanov@kot-begemot.co.uk \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).