From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Matthias Klein <matthias.klein@optimeas.de>
Cc: RT <linux-rt-users@vger.kernel.org>
Subject: Re: Oops with spin_lock() in an IRQF_NO_THREAD interrupt
Date: Fri, 4 Oct 2013 14:42:58 +0200 [thread overview]
Message-ID: <20131004124258.GE19953@linutronix.de> (raw)
In-Reply-To: <em8d903d65-1a3e-4973-9012-be50c5713bd5@nb-mak>
* Matthias Klein | 2013-10-02 14:54:00 [+0000]:
>Hello,
Hi,
>i am writing a kernel module on a rt kernel where I have an
>IRQF_NO_THREAD interrupt.
I hope you know what you are doing with this.
>For sharing a "write index" between that interrupt and the process
>context (ioctl() etc.) I use a spin_lock for locking.
>
>In the IRQ I use spin_lock() & spin_unlock(), and in the process
>context I use spin_lock_irq() & spin_unlock_irq().
>
>Basically the driver and the test application are working, but after
>some time I get an oops message.
>
>Do I use the right functions for locking ? Do you have a tip why I
>get that oops message ?
You should use a the raw_spinlock here if you _really_ need
IRQF_NO_THREAD.
>Best regards,
>
>Matthias
Sebastian
prev parent reply other threads:[~2013-10-04 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 14:54 Oops with spin_lock() in an IRQF_NO_THREAD interrupt Matthias Klein
2013-10-04 12:42 ` 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=20131004124258.GE19953@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-rt-users@vger.kernel.org \
--cc=matthias.klein@optimeas.de \
/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.