From: Ingo Molnar Date: Tue, 10 Jan 2006 21:10:36 +0000 (+0100) Subject: [PATCH] mark mutex_lock*() as might_sleep() X-Git-Tag: v2.6.16-rc1~447 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c544bdb1999e04eb10035f1c3262a103859d94b2;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [PATCH] mark mutex_lock*() as might_sleep() Mark mutex_lock() and mutex_lock_interruptible() as might_sleep() functions. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds --- diff --git a/kernel/mutex.c b/kernel/mutex.c index d3dcb8b..5c25618 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c @@ -81,6 +81,7 @@ __mutex_lock_slowpath(atomic_t *lock_count __IP_DECL__); */ void fastcall __sched mutex_lock(struct mutex *lock) { + might_sleep(); /* * The locking fastpath is the 1->0 transition from * 'unlocked' into 'locked' state. @@ -253,6 +254,7 @@ __mutex_lock_interruptible_slowpath(atomic_t *lock_count __IP_DECL__); */ int fastcall __sched mutex_lock_interruptible(struct mutex *lock) { + might_sleep(); return __mutex_fastpath_lock_retval (&lock->count, __mutex_lock_interruptible_slowpath); }