On Sun, 2005-12-18 at 10:42 -0800, Linus Torvalds wrote: > It's easy enough to add a "might_sleep()" to the up(). Not strictly true, > but conceptually it would make sense to make up/down match in that sense. > We'd have to mark the (few) places that do down_trylock() + up() in > interrupt context with a special "up_in_interrupt()", but that would be ok > even from a documentation standpoint. Actually, I don't think you want might_sleep(): there are a few cases where we do an up() from under a spinlock, which will spuriously trigger this. I'd suggest WARN_ON(in_interrupt()) instead. James - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- References:
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Linus Torvalds <[email protected]>
- [PATCH 0/12]: MUTEX: Introduce mutex implementation
- From: David Howells <[email protected]>
- [PATCH 1/12]: MUTEX: Implement mutexes
- From: David Howells <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Steven Rostedt <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: David Howells <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Nicolas Pitre <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Nicolas Pitre <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Russell King <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 1/12]: MUTEX: Implement mutexes
- Prev by Date: Re: Linux 2.6.14.4 [intelfb problem]
- Next by Date: Re: [PATCH 03/13] [RFC] ipath copy routines
- Previous by thread: Re: [PATCH 1/12]: MUTEX: Implement mutexes
- Next by thread: Re: [PATCH 1/12]: MUTEX: Implement mutexes
- Index(es):