Check FreeBSD upstream changes and apply important patches.
* sysv_sem.cc (__semctl): Check copyin return value (from 1.76). * sysv_shm.cc (shminit): Actually use the iterating variable in the for loop when trying to avoid overflow (from 1.102).
This commit is contained in:
parent
104fffd24d
commit
e3786825c0
|
@ -1,3 +1,10 @@
|
|||
2006-01-09 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
Check FreeBSD upstream changes and apply important patches.
|
||||
* sysv_sem.cc (__semctl): Check copyin return value (from 1.76).
|
||||
* sysv_shm.cc (shminit): Actually use the iterating variable in the
|
||||
for loop when trying to avoid overflow (from 1.102).
|
||||
|
||||
2005-11-10 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* bsd_helper.cc (securityinit): New function. Move initialization
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#define __FBSDID(s) const char version[] = (s)
|
||||
#endif
|
||||
__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/sysv_msg.c,v 1.52 2003/11/07 04:47:14 rwatson Exp $");
|
||||
/* CV, 2006-01-09: Inspected upstream up to version 1.60. */
|
||||
|
||||
#define _KERNEL 1
|
||||
#define __BSD_VISIBLE 1
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#define __FBSDID(s) const char version[] = (s)
|
||||
#endif
|
||||
__FBSDID("$FreeBSD: /repoman/r/ncvs/src/sys/kern/sysv_sem.c,v 1.70 2004/05/30 20:34:58 phk Exp $");
|
||||
/* CV, 2006-01-09: Inspected upstream up to version 1.78. */
|
||||
|
||||
#define _KERNEL 1
|
||||
#define __BSD_VISIBLE 1
|
||||
|
@ -806,7 +807,7 @@ raced:
|
|||
if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
|
||||
goto done2;
|
||||
array = (u_short *) sys_malloc(sizeof(*array) * count, M_TEMP, M_WAITOK);
|
||||
copyin(real_arg.array, array, count * sizeof(*array));
|
||||
error = copyin(real_arg.array, array, count * sizeof(*array));
|
||||
if (error)
|
||||
break;
|
||||
mtx_lock(sema_mtxp);
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#define __FBSDID(s) const char version[] = (s)
|
||||
#endif
|
||||
__FBSDID("$FreeBSD: /repoman/r/ncvs/src/sys/kern/sysv_shm.c,v 1.89 2003/11/07 04:47:14 rwatson Exp $");
|
||||
/* CV, 2006-01-09: Inspected upstream up to version 1.104. */
|
||||
|
||||
#define _KERNEL 1
|
||||
#define __BSD_VISIBLE 1
|
||||
|
@ -954,7 +955,7 @@ shminit(void)
|
|||
|
||||
TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
|
||||
for (i = PAGE_SIZE; i > 0; i--) {
|
||||
shminfo.shmmax = shminfo.shmall * PAGE_SIZE;
|
||||
shminfo.shmmax = shminfo.shmall * i;
|
||||
if (shminfo.shmmax >= shminfo.shmall)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue