Alan Stern <stern@rowland.harvard.edu> wrote:My fault (again). Obviously it *looked* like something people could use to me... How about the following patch as a short-term penance to keep others from making the same mistake? jon -- Discourage people from using in_atomic() Signed-off-by: Jonathan Corbet <corbet@lwn.net> diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 4982998..3d196cb 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -72,6 +72,11 @@ #define in_softirq() (softirq_count()) #define in_interrupt() (irq_count()) +/* + * Are we running in atomic context? WARNING: this macro cannot + * always detect atomic context and should not be used to determine + * whether sleeping is possible. Do not use it in driver code. + */ #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) #ifdef CONFIG_PREEMPT --
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| David Miller | Re: 2.6.24-rc6-mm1: some section mismatches on sparc64 |
| S.Çağlar | Rescheduling interrupts |
git: | |
| Ken Pratt | pack operation is thrashing my server |
| Aaron Bentley | Re: VCS comparison table |
| Imran M Yousuf | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| しらいしななこ | Re: [ANNOUNCE] GIT 1.5.4 |
| Marco Peereboom | Re: Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Kevin Neff | Patching a SSH 'Weakness' |
| Steve B | Intel Atom and D945GCLF2 |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| David Miller | Re: [BUG] New Kernel Bugs |
| Arjan van de Ven | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
