sysvsem: check if semu_list has anything on it before grabbing the lock

This should get a process-specific support instead.

MFC after:	1 week
This commit is contained in:
Mateusz Guzik 2017-10-19 00:31:00 +00:00
parent 72cc0b3d93
commit cb1c79008e

View File

@ -1412,6 +1412,8 @@ semexit_myhook(void *arg, struct proc *p)
* Go through the chain of undo vectors looking for one
* associated with this process.
*/
if (LIST_EMPTY(&semu_list))
return;
SEMUNDO_LOCK();
LIST_FOREACH(suptr, &semu_list, un_next) {
if (suptr->un_proc == p)