From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] local_irq_save/local_irq_restore in real-time interrupt handler and slab corruption.
Date: Tue, 13 Nov 2007 15:17:00 +0100 [thread overview]
Message-ID: <4739B1DC.4030705@domain.hid> (raw)
In-Reply-To: <2ff1a98a0711130556j58141e80yc0bca6b574fad7e9@domain.hid>
Gilles Chanteperdrix wrote:
> Hi,
>
> I am chasing a slab corruption bug which happens on a Xenomai+RTnet
> enabled box under heavy non real-time network load (which passes
> through rtnet and rtmac_vnic to Linux which does NAT and resend it to
> another rtmac_vnic). When reading some I-pipe tracer traces, I
> remarked that I forgot to replace a local_irq_save/local_irq_restore
> with local_irq_save_hw/local_irq_restore_hw in a real-time interrupt
> handler. I fixed this bug, and the slab corruption seems to be gone.
Hope you mean rtdm_lock_irqsave/irqrestore instead. Otherwise Xenomai's
domain state would not be updated appropriately - which is at least unclean.
BTW, CONFIG_IPIPE_DEBUG_CONTEXT should have caught this bug as well.
>
> So, my question is: is it possible ? I mean, if local_irq_restore in
> the real-time interrupt handler calls __ipipe_sync_stage, the root
> domain is not stalled, so there should be no problem Linux-wise
> playing root domain interrupts, I would rather expect the I-pipe state
> to be jammed (after all, we are probably reentering functions that
> should not be reentered), not Linux state.
If I grab it correctly ATM, __ipipe_sync_stage() does not check for the
domain stall bits, it assumes the caller has done so. Thus,
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2007-11-13 14:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 13:56 [Xenomai-core] local_irq_save/local_irq_restore in real-time interrupt handler and slab corruption Gilles Chanteperdrix
2007-11-13 14:17 ` Jan Kiszka [this message]
2007-11-13 14:34 ` Gilles Chanteperdrix
2007-11-13 17:10 ` Philippe Gerum
2007-11-13 17:24 ` Gilles Chanteperdrix
2007-11-13 17:44 ` Philippe Gerum
2007-11-13 17:50 ` Gilles Chanteperdrix
2007-11-13 18:02 ` Philippe Gerum
2007-11-26 10:42 ` Gilles Chanteperdrix
2007-11-13 18:04 ` Philippe Gerum
2007-11-13 17:45 ` Jan Kiszka
2007-11-13 17:51 ` Gilles Chanteperdrix
2007-11-13 17:54 ` Jan Kiszka
2007-11-13 18:33 ` Gilles Chanteperdrix
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=4739B1DC.4030705@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.