From: Keith Owens <kaos@ocs.com.au>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c
Date: Mon, 31 May 2004 17:56:51 +1000 [thread overview]
Message-ID: <16253.1085990211@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Mon, 31 May 2004 03:50:19 -0400." <Pine.LNX.4.58.0405310347140.1794@montezuma.fsmlabs.com>
On Mon, 31 May 2004 03:50:19 -0400 (EDT),
Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>On Mon, 31 May 2004, Keith Owens wrote:
>
>> 2.6.7-rc2 (and earlier) arch/i386/kernel/irq.c::do_IRQ() calls
>> irq_exit() which expands into preempt_enable_no_resched(), amongst
>> others. With CONFIG_PREEMPT=y, preempt_enable_no_resched() does
>> dec_preempt_count(). Where is the corresponding inc_preempt_count?
>> AFAICT the use of preempt_enable_no_resched() is unbalanced.
>
>I believe IRQ_EXIT_OFFSET takes care of that;
>
>#define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
>
>#define irq_exit() \
>do { \
> preempt_count() -= IRQ_EXIT_OFFSET; \
> if (!in_interrupt() && softirq_pending(smp_processor_id())) \
> do_softirq(); \
> preempt_enable_no_resched(); \
>} while (0)
How ugly ....
next prev parent reply other threads:[~2004-05-31 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-31 7:35 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c Keith Owens
2004-05-31 7:50 ` Zwane Mwaikambo
2004-05-31 7:56 ` Keith Owens [this message]
2004-05-31 7:50 ` Nick Piggin
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=16253.1085990211@kao2.melbourne.sgi.com \
--to=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@linuxpower.ca \
/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