From: Francois Wellenreiter <Francois.Wellenreiter@Ext.Bull.Net>
To: linux-ia64@vger.kernel.org
Subject: writing to "/proc/irq/xxxx/smp_affinity" produces a kernel crash
Date: Tue, 17 Aug 2004 12:50:46 +0000 [thread overview]
Message-ID: <4121FF26.70102@Ext.Bull.Net> (raw)
Dear all,
Apparently a little bug was introduced in 2.6.7 kernel dealing with IRQ
redirection managemant via proc filesystem.
The behavior is quite simple, just type :
echo "r 00000001" > /proc/irq/{xy}/smp_affinity
where {xy} is a valid irq, and your kernel will crash.
The bug is located in the file arch/ia64/kernel/irq.c , function
irq_affinity_write_proc,
at the following line we set a value called irq :
__________________
if (copy_from_user(rbuf, buffer, rlen))
return -EFAULT;
rbuf[rlen] = 0;
prelen = 0;
if (tolower(*rbuf) = 'r') {
prelen = strspn(rbuf, "Rr ");
irq |= IA64_IRQ_REDIRECTED; <----- IA64_IRQ_REDIRECTED
= 1<31 !!!!!
}
__________________
and later it is written :
__________________
spin_lock_irqsave(&desc->lock, flags);
pending_irq_cpumask[irq] = new_value; <----- code generating a
fatal page fault
spin_unlock_irqrestore(&desc->lock, flags);
__________________
reading this code, a trouble clearly exists around the irq notion.
The "irq" corresponding to irq number programmed in IOSAPIC
(taking into account the IA64_IRQ_REDIRECTED bit) is mixed with the
the irq index in the irq_affinity table.
Best regards,
Francois WELLENREITER
next reply other threads:[~2004-08-17 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-17 12:50 Francois Wellenreiter [this message]
2004-08-17 13:07 ` writing to "/proc/irq/xxxx/smp_affinity" produces a kernel crash David Mosberger
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=4121FF26.70102@Ext.Bull.Net \
--to=francois.wellenreiter@ext.bull.net \
--cc=linux-ia64@vger.kernel.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