mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Renew semaphore's pointer after wakeup since during msleep
sem_base may have been modified by destroying one of semaphores and semptr would not be valid in this case. PR: kern/123731
This commit is contained in:
parent
145d2d3ac4
commit
23c8064e66
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179879
@ -1166,6 +1166,13 @@ semop(td, uap)
|
||||
goto done2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Renew the semaphore's pointer after wakeup since
|
||||
* during msleep sem_base may have been modified and semptr
|
||||
* is not valid any more
|
||||
*/
|
||||
semptr = &semakptr->u.sem_base[sopptr->sem_num];
|
||||
|
||||
/*
|
||||
* The semaphore is still alive. Readjust the count of
|
||||
* waiting processes.
|
||||
|
Loading…
Reference in New Issue
Block a user