Subject: shmget panic()
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Andy Heffernan <ahh@cisco.com>
List: current-users
Date: 06/26/1994 00:58:36
Hello,
I'm running an Amiga kernel, supped last night, with DEBUG defined. I
get a panic calling shmget() (and later shmctl(shmid, IPC_RMID, ...))
due to some DEBUG code in the routines vm_map_entry_create() and
vm_map_entry_dispose() in sys/vm/vm_map.c.
The routines panic because sysvshm_map isn't "special" but is marked
non-pageable. The init code in sys/kern/sysv_shm.c explicitly
allocates the map non-pageable, so I offer this fix:
*** vm_map.c-orig Mon May 23 03:35:12 1994
--- vm_map.c Sun Jun 26 00:10:29 1994
***************
*** 283,291 ****
--- 283,297 ----
vm_map_entry_t entry;
#ifdef DEBUG
extern vm_map_t kernel_map, kmem_map, mb_map, pager_map;
+ #ifdef SYSVSHM
+ extern vm_map_t sysvshm_map;
+ #endif
boolean_t isspecial;
isspecial = (map == kernel_map || map == kmem_map ||
+ #ifdef SYSVSHM
+ map == sysvshm_map ||
+ #endif
map == mb_map || map == pager_map);
if (isspecial && map->entries_pageable ||
!isspecial && !map->entries_pageable)
***************
*** 316,324 ****
--- 322,336 ----
{
#ifdef DEBUG
extern vm_map_t kernel_map, kmem_map, mb_map, pager_map;
+ #ifdef SYSVSHM
+ extern vm_map_t sysvshm_map;
+ #endif
boolean_t isspecial;
isspecial = (map == kernel_map || map == kmem_map ||
+ #ifdef SYSVSHM
+ map == sysvshm_map ||
+ #endif
map == mb_map || map == pager_map);
if (isspecial && map->entries_pageable ||
!isspecial && !map->entries_pageable)
------------------------------------------------------------------------------