aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sysv_sem.c
Commit message (Collapse)AuthorAgeFilesLines
* sysv_sem: semusz depends on semume.Konstantin Belousov2020-10-221-4/+5
| | | | | | | | | | | | | | | | | Size of the per-process semaphore undo structure (semusz) depends on the number of the per-process undos. If kern.ipc.semume is adjusted, semusz must be adjusted as well, and it makes no sense to delegate adjustment to user. Make it automatic. Reported and tested by: Olef <o.vandestadt@gmail.com> PR: 250361 Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26826 Notes: svn path=/head/; revision=366932
* Don't invoke semunload() if seminit() fails during MOD_LOAD.John Baldwin2020-10-091-2/+0
| | | | | | | | | | | | | | | | | The module handler code invokes a MOD_UNLOAD event immediately if MOD_LOAD fails. The result was that if seminit() failed, semunload() was invoked twice. semunload() is not idempotent however and would try to remove it's process_exit eventhandler twice resulting in a panic. Reviewed by: kib, markj Obtained from: CheriBSD MFC after: 1 month Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26696 Notes: svn path=/head/; revision=366584
* Apply the logic from r363051 to semctl(2) and __sem_base field.Mark Johnston2020-07-091-0/+7
| | | | | | | | | | Reported by: Jeffball <jeffball@grimm-co.com> MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25600 Notes: svn path=/head/; revision=363055
* Centralize compatability translation macros.Brooks Davis2020-04-141-4/+1
| | | | | | | | | | | | | | | | Copy the CP, PTRIN, etc macros from freebsd32.h into a sys/abi_compat.h and replace existing definitation with includes where required. This eliminates duplicate code and allows Linux and FreeBSD compatability headers to be included in the same files. Input from: cem, jhb Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24275 Notes: svn path=/head/; revision=359937
* sem_remove(): fix the loop that compacts sem array on semaphores removal.Konstantin Belousov2020-02-151-2/+3
| | | | | | | | | | | | | | As written now, it copies random kernel memory from beyond the bounds of the array. Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23694 Notes: svn path=/head/; revision=357984
* sem_remove(): add some asserts.Konstantin Belousov2020-02-151-1/+7
| | | | | | | | | | | | | | Assert that sema[idx] allocation from sem[] is sane. Also assert that sem_mtx is owned, it protects the SEM_ALLOC flag. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23694 Notes: svn path=/head/; revision=357983
* Use designated initializers for seminfo.Konstantin Belousov2020-02-151-9/+9
| | | | | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23694 Notes: svn path=/head/; revision=357982
* Correct the malloc tag used when freeing the temporary semop(2) buffer.Mark Johnston2020-02-041-2/+2
| | | | | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=357525
* Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis2018-04-061-1/+0
| | | | | | | | | | | | | | | | | | | | | opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
* Rename kernel-only members of semid_ds and msgid_ds.Brooks Davis2018-03-021-36/+36
| | | | | | | | | | | | | | | | | | This deliberately breaks the API in preperation for future syscall revisions which will remove these nonstandard members. In an exp-run a single port (devel/qemu-user-static) was found to use them which it did becuase it emulates system calls. This has been fixed in the ports tree. PR: 224443 (exp-run) Reviewed by: kib, jhb (previous version) Exp-run by: antoine Sponsored by: DARPA, AFRP Differential Revision: https://reviews.freebsd.org/D14490 Notes: svn path=/head/; revision=330297
* Correct/improve the descriptions if kern.ipc.(shmsegs,sema,msqids).Brooks Davis2018-02-181-1/+2
| | | | | | | | | | | | | | The description of kern.ipc.shmsegs was wrong since 2005. I updated the others (which were more correct) to match. PR: 225933 Reviewed by: cem MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14391 Notes: svn path=/head/; revision=329525
* Add kern.ipc.{msqids,semsegs,sema} sysctls for FreeBSD32.Brooks Davis2018-02-021-2/+28
| | | | | | | | | | | | | | Stop leaking kernel pointers though theses sysctls and make sure that the padding in the structures is zeroed on allocation to avoid other leaks. Reviewed by: gordon, kib Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D13459 Notes: svn path=/head/; revision=328799
* sys/kern: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326271
* sysvsem: check if semu_list has anything on it before grabbing the lockMateusz Guzik2017-10-191-0/+2
| | | | | | | | | This should get a process-specific support instead. MFC after: 1 week Notes: svn path=/head/; revision=324733
* Audit arguments to System V IPC system calls implementing sempahores,Robert Watson2017-03-301-0/+15
| | | | | | | | | | | message queues, and shared memory. Obtained from: TrustedBSD Project MFC after: 3 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=316308
* When handling msgsys(2), semsys(2), and shmsys(2) multiplex system calls,Robert Watson2017-03-291-0/+3
| | | | | | | | | | | | map the 'which' argument into a suitable audit event identifier for the specific operation requested. Obtained from: TrustedBSD Project MFC after: 3 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=316185
* sys/kern: spelling fixes in comments.Pedro F. Giffuni2016-04-291-1/+1
| | | | | | | No functional change. Notes: svn path=/head/; revision=298819
* osd(9): Change array pointer to array pointer type from void*Conrad Meyer2016-04-261-1/+1
| | | | | | | | | | | | | | | | This is a minor follow-up to r297422, prompted by a Coverity warning. (It's not a real defect, just a code smell.) OSD slot array reservations are an array of pointers (void **) but were cast to void* and back unnecessarily. Keep the correct type from reservation to use. osd.9 is updated to match, along with a few trivial igor fixes. Reported by: Coverity CID: 1353811 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=298661
* Redo the changes to the SYSV IPC sysctl functions from r298585, so theyJamie Gritton2016-04-261-28/+18
| | | | | | | | | don't (mis)use sbufs. PR: 48471 Notes: svn path=/head/; revision=298656
* Encapsulate SYSV IPC objects in jails. Define per-module parametersJamie Gritton2016-04-251-48/+350
| | | | | | | | | | | | | | | | | | | | | | | sysvmsg, sysvsem, and sysvshm, with the following bahavior: inherit: allow full access to the IPC primitives. This is the same as the current setup with allow.sysvipc is on. Jails and the base system can see (and moduly) each other's objects, which is generally considered a bad thing (though may be useful in some circumstances). disable: all no access, same as the current setup with allow.sysvipc off. new: A jail may see use the IPC objects that it has created. It also gets its own IPC key namespace, so different jails may have their own objects using the same key value. The parent jail (or base system) can see the jail's IPC objects, but not its keys. PR: 48471 Submitted by: based on work by kikuchan98@gmail.com MFC after: 5 days Notes: svn path=/head/; revision=298585
* sys: use our roundup2/rounddown2() macros when param.h is available.Pedro F. Giffuni2016-04-211-1/+1
| | | | | | | | | | | | | rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted. Notes: svn path=/head/; revision=298433
* Indentation issues.Pedro F. Giffuni2016-04-201-2/+1
| | | | | | | | | Contract some lines leftover from r298310. Mea culpa. Notes: svn path=/head/; revision=298354
* kernel: use our nitems() macro when it is available through param.h.Pedro F. Giffuni2016-04-191-1/+1
| | | | | | | | | No functional change, only trivial cases are done in this sweep, Discussed in: freebsd-current Notes: svn path=/head/; revision=298310
* kern: for pointers replace 0 with NULL.Pedro F. Giffuni2016-04-151-2/+2
| | | | | | | | | These are mostly cosmetical, no functional change. Found with devel/coccinelle. Notes: svn path=/head/; revision=298069
* semget(): Check for [EEXIST] error first.Jilles Tjoelker2016-02-071-5/+5
| | | | | | | | | | | | | Although POSIX literally permits failing with [EINVAL] if IPC_CREAT and IPC_EXCL were both passed, the semaphore set already exists and has fewer semaphores than nsems, this does not allow an application to retry safely: if the [EINVAL] is actually because of the semmsl limit, an infinite loop would result. PR: 206927 Notes: svn path=/head/; revision=295385
* Add kern.racct.enable tunable and RACCT_DISABLED config option.Edward Tomasz Napierala2015-04-291-10/+15
| | | | | | | | | | | | | | The point of this is to be able to add RACCT (with RACCT_DISABLED) to GENERIC, to avoid having to rebuild the kernel to use rctl(8). Differential Revision: https://reviews.freebsd.org/D2369 Reviewed by: kib@ MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=282213
* Avoid dynamic syscall overhead for statically compiled modules.Mateusz Guzik2014-10-261-2/+2
| | | | | | | | | | | | | | | | The kernel tracks syscall users so that modules can safely unregister them. But if the module is not unloadable or was compiled into the kernel, there is no need to do this. Achieve this by adding SY_THR_STATIC_KLD macro which expands to SY_THR_STATIC during kernel build and 0 otherwise. Reviewed by: kib (previous version) MFC after: 2 weeks Notes: svn path=/head/; revision=273707
* Pull in r267961 and r267973 again. Fix for issues reported will follow.Hans Petter Selasky2014-06-281-13/+3
| | | | Notes: svn path=/head/; revision=267992
* Revert r267961, r267973:Glen Barber2014-06-271-3/+13
| | | | | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory Notes: svn path=/head/; revision=267985
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifHans Petter Selasky2014-06-271-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=267961
* In order to maximize the re-usability of kernel code in user space thisKip Macy2011-09-161-10/+10
| | | | | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz) Notes: svn path=/head/; revision=225617
* Remove semaphore map entry count "semmap" field and its tuningBjoern A. Zeeb2011-07-141-7/+0
| | | | | | | | | | | | | | option that is highly recommended to be adjusted in too much documentation while doing nothing in FreeBSD since r2729 (rev 1.1). ipcs(1) needs to be recompiled as it is accessing _KERNEL private variables. Reviewed by: jhb (before comment change on linux code) Sponsored by: Sandvine Incorporated Notes: svn path=/head/; revision=224016
* All the racct_*() calls need to happen with the proc locked. Fixing thisEdward Tomasz Napierala2011-07-061-0/+4
| | | | | | | | | won't happen before 9.0. This commit adds "#ifdef RACCT" around all the "PROC_LOCK(p); racct_whatever(p, ...); PROC_UNLOCK(p)" instances, in order to avoid useless locking/unlocking in kernels built without "options RACCT". Notes: svn path=/head/; revision=223825
* Style fix.Edward Tomasz Napierala2011-04-061-2/+1
| | | | | | | Submitted by: jhb@ Notes: svn path=/head/; revision=220399
* Add accounting for SysV-related resources.Edward Tomasz Napierala2011-04-061-3/+19
| | | | | | | | Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version) Notes: svn path=/head/; revision=220398
* Add ucred pointer to the SysV-related memory structures. This is requiredEdward Tomasz Napierala2011-04-061-0/+4
| | | | | | | | | | | | | for racct. Note that after this commit, ipcs(1) needs to be rebuilt. Otherwise, it will fail with "ipcs: sysctlbyname: kern.ipc.msqids: Cannot allocate memory". Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version) Notes: svn path=/head/; revision=220388
* Add some FEATURE macros for various features (AUDIT/CAM/IPC/KTR/MAC/NFS/NTP/Alexander Leidinger2011-02-251-0/+2
| | | | | | | | | | | | | | | | PMC/SYSV/...). No FreeBSD version bump, the userland application to query the features will be committed last and can serve as an indication of the availablility if needed. Sponsored by: Google Summer of Code 2010 Submitted by: kibab Reviewed by: arch@ (parts by rwatson, trasz, jhb) X-MFC after: to be determined in last commit with code from this project Notes: svn path=/head/; revision=219028
* Specify a CTLTYPE_FOO so that a future sysctl(8) change does not needMatthew D Fleming2011-01-181-1/+1
| | | | | | | to rely on the format string. Notes: svn path=/head/; revision=217555
* Add some descriptions to sys/kern sysctls.Rebecca Cran2010-11-141-1/+1
| | | | | | | | | PR: kern/148710 Tested by: Chip Camden <sterling at camdensoftware.com> MFC after: 1 week Notes: svn path=/head/; revision=215281
* In another move to join with the age of the Fruitbat, increase SYSVIvan Voras2010-06-111-4/+4
| | | | | | | | | | | | | | shared resources defaults beyond absolute minimums. The new values are chosen mostly by magic. They are still fairly small and will need increasing for large installations (especially SHMMAX). However, they are now enough to e.g. start PostgreSQL installations with ~~300 users and nearly 512 MB of shared buffers. Reviewed by: A short discussion on hackers@ Notes: svn path=/head/; revision=209037
* Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to correspondingKonstantin Belousov2010-03-191-13/+223
| | | | | | | | | | | | | | | | | sysv_{msg,sem,shm}.c files. Mark SysV IPC freebsd32 syscalls as NOSTD and add required SYSCALL_INIT_HELPER/SYSCALL32_INIT_HELPERs to provide auto register/unregister on module load. This makes COMPAT_FREEBSD32 functional with SysV IPC compiled and loaded as modules. Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=205323
* Change the ABI of some of the structures used by the SYSV IPC API:John Baldwin2009-06-241-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned short. - The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned short. - The mode member of struct ipc_perm is now mode_t instead of unsigned short (this is merely a style bug). - The rather dubious padding fields for ABI compat with SV/I386 have been removed from struct msqid_ds and struct semid_ds. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int. This removes the need for the shm_bsegsz member in struct shmid_kernel and should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The shm_internal member of struct shmid_ds is now gone. The internal VM object pointer for SHM regions has been moved into struct shmid_kernel. - The existing __semctl(), msgctl(), and shmctl() system call entries are now marked COMPAT7 and new versions of those system calls which support the new ABI are now present. - The new system calls are assigned to the FBSD-1.1 version in libc. The FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls. - A simplistic framework for tagging system calls with compatibility symbol versions has been added to libc. Version tags are added to system calls by adding an appropriate __sym_compat() entry to src/lib/libc/incldue/compat.h. [1] PR: kern/16195 kern/113218 bin/129855 Reviewed by: arch@, rwatson Discussed with: kan, kib [1] Notes: svn path=/head/; revision=194910
* Deprecate the msgsys(), semsys(), and shmsys() system calls by movingJohn Baldwin2009-06-241-33/+39
| | | | | | | | | | | | them under COMPAT_FREEBSD[4567]. Starting with FreeBSD 5.0 the SYSV IPC API was implemented via direct system calls (e.g. msgctl(), msgget(), etc.) rather than indirecting through the var-args *sys() system calls. The shmsys() system call was already effectively deprecated for all but COMPAT_FREEBSD4 already as its implementation for the !COMPAT_FREEBSD4 case was to simply invoke nosys(). Notes: svn path=/head/; revision=194894
* - Move syscall function argument structure types to be just above theJohn Baldwin2009-06-241-2/+1
| | | | | | | | relevenat system call function. - Whitespace fixes. Notes: svn path=/head/; revision=194832
* Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERICRobert Watson2009-06-051-1/+0
| | | | | | | | | | | and used in a large number of files, but also because an increasing number of incorrect uses of MAC calls were sneaking in due to copy-and-paste of MAC-aware code without the associated opt_mac.h include. Discussed with: pjd Notes: svn path=/head/; revision=193511
* Add hierarchical jails. A jail may further virtualize its environmentJamie Gritton2009-05-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | by creating a child jail, which is visible to that jail and to any parent jails. Child jails may be restricted more than their parents, but never less. Jail names reflect this hierarchy, being MIB-style dot-separated strings. Every thread now points to a jail, the default being prison0, which contains information about the physical system. Prison0's root directory is the same as rootvnode; its hostname is the same as the global hostname, and its securelevel replaces the global securelevel. Note that the variable "securelevel" has actually gone away, which should not cause any problems for code that properly uses securelevel_gt() and securelevel_ge(). Some jail-related permissions that were kept in global variables and set via sysctls are now per-jail settings. The sysctls still exist for backward compatibility, used only by the now-deprecated jail(2) system call. Approved by: bz (mentor) Notes: svn path=/head/; revision=192895
* Fix memory leak in semunload().Christian Brueffer2009-03-301-0/+1
| | | | | | | | | PR: 133064 Submitted by: Mateusz Guzik <mjguzik@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=190557
* Lock the semaphore identifier lock during semaphore initialization toKonstantin Belousov2009-01-151-0/+4
| | | | | | | | | | | | guarantee atomicity of the operation for other semaphore consumers. In particular, this should guard against access to the semaphore with not done or partially done MAC label assignment. Reviewed by: rwatson MFC after: 1 month Notes: svn path=/head/; revision=187298
* It seems that there are at least three issues with IPC_RMID operationKonstantin Belousov2009-01-141-152/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on SysV semaphores. The squeeze of the semaphore array in the kern_semctl() modifies sem_base for the semaphores with sem_base greater then sem_base of the removed semaphore, as well as the values of the semaphores, without locking their mutex. This can lead to (killable) hangs or unexpected behaviour of the processes performing any sem operations while other process does IPC_RMID. The semexit_myhook() eventhandler unlocks SEMUNDO_LOCK() while accessing *suptr. This allows for IPC_RMID for the sem id to be performed in parallel with undo hook referenced by the current undo structure. This leads to the panic("semexit - semid not allocated") [1]. The semaphore creation is protected by Giant, while IPC_RMID is done while only semaphore mutex is held. This seems to result in invalid values for semtot, causing random ENOSPC error returns [2]. Redo the locking of the semaphores lifetime cycle. Delegate the sem_mtx to the sole purpose of protecting semget() and semctl(IPC_RMID). Introduce new sem_undo_mtx to protect SEM_UNDO handling. Remove the Giant remnants from the code. Note that mac_sysvsem_check_semget() and mac_sysvsem_create() are now called while sem_mtx is held, as well as mac_sysvsem_cleanup() [3]. When semaphore is removed, acquire semaphore locks for all semaphores with sem_base that is going to be changed by squeeze of the sema array. The lock order is not important there, because the region is protected by sem_mtx. Organize both used and free sem_undo structures into the lists, protected by sem_undo_mtx. In semexit_myhook(), remove sem_undo structure that is being processed, from used list, without putting it onto the free to prevent modifications by other threads. This allows for sem_undo_lock to be dropped to acquire individial semaphore locks without violating lock order. Since IPC_RMID may no longer find this sem_undo, do tolerate references to unallocated semaphores in undo structure, and check sequential number to not undo unrelated semaphore with the same id. While there, convert functions definitions to ANSI C and fix small style(9) glitches. Reported by: Omer Faruk Sen <omerfsen gmail com> [1], pho [2] Reviewed by: rwatson [3] Tested by: pho MFC after: 1 month Notes: svn path=/head/; revision=187223
* Renew semaphore's pointer after wakeup since during msleepOleksandr Tymoshenko2008-06-191-0/+7
| | | | | | | | | | sem_base may have been modified by destroying one of semaphores and semptr would not be valid in this case. PR: kern/123731 Notes: svn path=/head/; revision=179879