]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] 2.5.10 BKL not always released in sem_exit()
authorChris Wright <chris@wirex.com>
Sun, 28 Apr 2002 12:17:09 +0000 (05:17 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 28 Apr 2002 12:17:09 +0000 (05:17 -0700)
The patch below fixes sem_exit() so that the BKL is always released.

ipc/sem.c

index 16422138f0a9db21cc3d1bbf3b6d59a244cfc3e2..4187ab77b44edf8b8a900f360d58a1ac4b2ef6f7 100644 (file)
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1176,8 +1176,10 @@ void sem_exit (void)
        }
 
        undo_list = current->sysvsem.undo_list;
-       if ((undo_list == NULL) || (atomic_read(&undo_list->refcnt) != 1))
+       if ((undo_list == NULL) || (atomic_read(&undo_list->refcnt) != 1)) {
+               unlock_kernel();
                return;
+       }
 
        /* There's no need to hold the semundo list lock, as current
          * is the last task exiting for this undo list.