[PATCH] mark mutex_lock*() as might_sleep()
authorIngo Molnar <mingo@elte.hu>
Tue, 10 Jan 2006 21:10:36 +0000 (22:10 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 21:20:47 +0000 (13:20 -0800)
Mark mutex_lock() and mutex_lock_interruptible() as might_sleep()
functions.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/mutex.c

index d3dcb8b44bacd2611e433adb7fedc20f9ccd3725..5c2561844196303f272a399fd1d8c86c22e7ac1e 100644 (file)
@@ -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);
 }