Fixed problems with kernel config file overrides of sysv semaphore
parameters. Prior to this fix a kernel config override would effect only some of the kernel files, resulting in panics. PR: kern/9068
This commit is contained in:
parent
ca2d126e65
commit
f66e49e9b8
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)param.c 8.3 (Berkeley) 8/20/94
|
||||
* $Id: param.c,v 1.30 1998/07/11 13:06:38 bde Exp $
|
||||
* $Id: param.c,v 1.31 1998/11/05 14:28:17 dg Exp $
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "opt_sysvipc.h"
|
||||
#include "opt_param.h"
|
||||
|
||||
|
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)param.c 8.3 (Berkeley) 8/20/94
|
||||
* $Id: param.c,v 1.30 1998/07/11 13:06:38 bde Exp $
|
||||
* $Id: param.c,v 1.31 1998/11/05 14:28:17 dg Exp $
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "opt_sysvipc.h"
|
||||
#include "opt_param.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: sysv_sem.c,v 1.20 1997/11/06 19:29:24 phk Exp $ */
|
||||
/* $Id: sysv_sem.c,v 1.21 1998/03/30 09:50:41 phk Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation of SVID semaphores
|
||||
@ -276,7 +276,7 @@ semundo_adjust(p, supptr, semid, semnum, adjval)
|
||||
/* Didn't find the right entry - create it */
|
||||
if (adjval == 0)
|
||||
return(0);
|
||||
if (suptr->un_cnt != SEMUME) {
|
||||
if (suptr->un_cnt != seminfo.semume) {
|
||||
sunptr = &suptr->un_ent[suptr->un_cnt];
|
||||
suptr->un_cnt++;
|
||||
sunptr->un_adjval = adjval;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: sem.h,v 1.14 1998/05/31 04:09:09 steve Exp $ */
|
||||
/* $Id: sem.h,v 1.15 1998/07/15 02:32:32 bde Exp $ */
|
||||
/* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -141,7 +141,7 @@ extern struct seminfo seminfo;
|
||||
#endif
|
||||
|
||||
/* actual size of an undo structure */
|
||||
#define SEMUSZ (sizeof(struct sem_undo)+sizeof(struct undo)*SEMUME)
|
||||
#define SEMUSZ (offsetof(struct sem_undo, un_ent[SEMUME]))
|
||||
|
||||
extern struct semid_ds *sema; /* semaphore id pool */
|
||||
extern struct sem *sem; /* semaphore pool */
|
||||
@ -150,7 +150,7 @@ extern int *semu; /* undo structure pool */
|
||||
/*
|
||||
* Macro to find a particular sem_undo vector
|
||||
*/
|
||||
#define SEMU(ix) ((struct sem_undo *)(((intptr_t)semu)+ix * SEMUSZ))
|
||||
#define SEMU(ix) ((struct sem_undo *)(((intptr_t)semu)+ix * seminfo.semusz))
|
||||
|
||||
/*
|
||||
* Process sem_undo vectors at proc exit.
|
||||
|
Loading…
Reference in New Issue
Block a user