2002-04-26 03:11:56

by Chris Wright

[permalink] [raw]
Subject: [PATCH] 2.5.10 BKL not always released in sem_exit()

Hi Linus,

The patch below fixes sem_exit() so that the BKL is always released.

thanks,
-chris

===== ipc/sem.c 1.5 vs edited =====
--- 1.5/ipc/sem.c Tue Apr 23 17:15:25 2002
+++ edited/ipc/sem.c Thu Apr 25 20:01:02 2002
@@ -1176,8 +1176,10 @@
}

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.