linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Tiejun Chen <tiejun.chen@windriver.com>
Cc: tglx@linutronix.de, linux-rt-users@vger.kernel.org
Subject: Re: [v2 PATCH] rcutree/rcu_bh_qs: disable irq while calling rcu_preempt_qs()
Date: Fri, 20 Dec 2013 14:30:42 +0100	[thread overview]
Message-ID: <20131220133042.GC10249@linutronix.de> (raw)
In-Reply-To: <1387360309-12801-1-git-send-email-tiejun.chen@windriver.com>

* Tiejun Chen | 2013-12-18 17:51:49 [+0800]:

>Any callers to the function rcu_preempt_qs() must disable irqs in
>order to protect the assignment to ->rcu_read_unlock_special. In
>RT case, rcu_bh_qs() as the wrapper of rcu_preempt_qs() is called
>in some scenarios where irq is enabled, like this path,
>
>do_single_softirq()
>    |
>    + local_irq_enable();
>    + handle_softirq()
>    |    |
>    |    + rcu_bh_qs()
>    |        |
>    |        + rcu_preempt_qs()
>    |
>    + local_irq_disable()
>
>So here we'd better disable irq directly inside of rcu_bh_qs() to
>fix this, otherwise the kernel may be freezable sometimes as
>observed. And especially this way is also kind and safe for the
>potential rcu_bh_qs() usage elsewhere in the future.
>
>Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
>Signed-off-by: Bin Jiang <bin.jiang@windriver.com>
Applied.

Sebastian

      reply	other threads:[~2013-12-20 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  9:51 [v2 PATCH] rcutree/rcu_bh_qs: disable irq while calling rcu_preempt_qs() Tiejun Chen
2013-12-20 13:30 ` Sebastian Andrzej Siewior [this message]

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=20131220133042.GC10249@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tiejun.chen@windriver.com \
    /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).