From: Matthew Wilcox <matthew@wil.cx>
To: Roland Dreier <rdreier@cisco.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
Jens Axboe <axboe@suse.de>,
Russell King <rmk+lkml@arm.linux.org.uk>,
Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org, "Brown, Len" <len.brown@intel.com>,
"David S. Miller" <davem@davemloft.net>,
linux-acpi@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net, "Yu,
Luming" <luming.yu@intel.com>, Ben Castricum <lk@bencastricum.nl>,
sanjoy@mrao.cam.ac.uk, Helge Hafting <helgehaf@aitel.hist.no>,
"Carlo E. Prelz" <fluido@fluido.as>,
Gerrit Bruchh?user <gbruchhaeuser@gmx.de>,
Nicolas.Mailhot@LaPoste.net, Jaroslav Kysela <perex@suse.cz>,
Takashi Iwai <tiwai@suse.de>,
Patrizio Bassi <patrizio.bassi@gmail.com>,
Bj?rn Nilsson <bni.swe@gmail.com>,
Andrey Borzenkov <arvidjaar@mail.ru>,
"P. Christeas" <p_christ@hol.gr>, ghrt <ghrt@dial.kappa.ro>,
jinhong
Subject: Re: Linux 2.6.16-rc3
Date: Fri, 17 Feb 2006 22:30:32 -0700 [thread overview]
Message-ID: <20060218053032.GU12822@parisc-linux.org> (raw)
In-Reply-To: <adaaccpbekr.fsf@cisco.com>
On Fri, Feb 17, 2006 at 06:12:04PM -0800, Roland Dreier wrote:
> > +int execute_in_process_context(void (*fn)(void *data), void *data,
> > + struct execute_work *ew)
> > +{
> > + if (!in_interrupt()) {
> > + fn(data);
> > + return 0;
> > + }
>
> Is testing in_interrupt() really sufficient to make this work? I seem
> to remember that (at least) with CONFIG_PREEMPT disabled, there are
> contexts where it is not safe to sleep but where both in_interrupt()
> and in_atomic() still return 0.
That's correct -- in process context, with PREEMPT disabled and a spinlock
held, it's unsafe to call this function. It works well for the SCSI
usage (where it's called either in interrupt context or in user
context with no spinlocks held), but it's not *always* safe.
I think this needs to be documented in the kerneldoc.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
next prev parent reply other threads:[~2006-02-18 5:30 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.64.0602121709240.3691@g5.osdl.org>
2006-02-13 3:05 ` Linux 2.6.16-rc3 Andrew Morton
2006-02-13 3:22 ` Trond Myklebust
2006-02-13 3:28 ` Sanjoy Mahajan
2006-02-13 3:36 ` Jeff Garzik
2006-02-13 4:40 ` James Bottomley
2006-02-13 5:20 ` S3 sleep regression bisected (was Re: Linux 2.6.16-rc3) Sanjoy Mahajan
2006-02-13 7:04 ` Linux 2.6.16-rc3 Arjan van de Ven
2006-02-13 8:11 ` Jens Axboe
2006-02-13 9:22 ` Patrizio Bassi
2006-02-13 12:02 ` Takashi Iwai
2006-02-13 12:37 ` Patrizio Bassi
2006-02-13 13:13 ` Takashi Iwai
2006-02-13 13:31 ` Patrizio Bassi
2006-02-13 14:15 ` Takashi Iwai
2006-02-13 14:34 ` Patrizio Bassi
2006-02-13 14:39 ` Takashi Iwai
2006-02-13 13:09 ` Rafael J. Wysocki
2006-02-13 13:51 ` Takashi Iwai
2006-02-13 19:33 ` Rafael J. Wysocki
2006-02-13 20:38 ` Greg KH
2006-02-14 16:34 ` James Bottomley
2006-02-16 1:56 ` James Bottomley
2006-02-16 17:12 ` Russell King
2006-02-16 17:34 ` Stefan Richter
2006-02-16 17:57 ` James Bottomley
2006-02-16 18:09 ` Russell King
2006-02-16 18:14 ` James Bottomley
2006-02-16 18:18 ` Russell King
2006-02-16 19:09 ` James Bottomley
2006-02-16 20:01 ` Jens Axboe
2006-02-18 0:42 ` James Bottomley
2006-02-18 1:00 ` Greg KH
2006-02-18 2:12 ` Roland Dreier
2006-02-18 5:30 ` Matthew Wilcox [this message]
2006-02-18 10:03 ` [linux-usb-devel] " Sergey Vlasov
2006-02-19 14:30 ` James Bottomley
2006-02-23 18:43 ` James Bottomley
2006-02-18 20:16 ` Alan Stern
2006-02-19 13:51 ` James Bottomley
2006-02-18 21:06 ` Helge Hafting
2006-02-13 6:59 Brown, Len
-- strict thread matches above, loose matches on Subject: below --
2006-02-13 7:07 Brown, Len
2006-02-13 7:13 ` David S. Miller
2006-02-13 7:43 ` Sanjoy Mahajan
2006-02-13 8:02 Brown, Len
2006-02-13 8:12 ` Andrew Morton
2006-02-13 8:42 ` Sanjoy Mahajan
2006-02-13 8:57 ` Arjan van de Ven
2006-02-14 3:08 ` Michal Jaegermann
2006-02-14 3:28 ` Andrew Morton
2006-02-14 4:48 ` Dave Jones
2006-02-14 5:29 ` Arjan van de Ven
2006-02-14 6:22 ` Michal Jaegermann
2006-02-16 23:04 ` Pavel Machek
2006-02-14 3:30 ` Lee Revell
2006-02-14 6:55 ` Michal Jaegermann
2006-02-14 5:31 ` Arjan van de Ven
2006-02-14 21:17 ` Sanjoy Mahajan
2006-02-14 6:23 Brown, Len
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=20060218053032.GU12822@parisc-linux.org \
--to=matthew@wil.cx \
--cc=James.Bottomley@SteelEye.com \
--cc=Nicolas.Mailhot@LaPoste.net \
--cc=akpm@osdl.org \
--cc=arvidjaar@mail.ru \
--cc=axboe@suse.de \
--cc=bni.swe@gmail.com \
--cc=davem@davemloft.net \
--cc=fluido@fluido.as \
--cc=gbruchhaeuser@gmx.de \
--cc=ghrt@dial.kappa.ro \
--cc=greg@kroah.com \
--cc=helgehaf@aitel.hist.no \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=lk@bencastricum.nl \
--cc=luming.yu@intel.com \
--cc=p_christ@hol.gr \
--cc=patrizio.bassi@gmail.com \
--cc=perex@suse.cz \
--cc=rdreier@cisco.com \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=sanjoy@mrao.cam.ac.uk \
--cc=tiwai@suse.de \
--cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).