Re: 2.3.51-52.pre1, shm and mounting somewhere else than /var/shm...

From: almesber@lrc.di.epfl.ch
Date: Wed Mar 15 2000 - 12:31:54 EST


Christoph Rohland wrote:
> Unfortunately the fs does not get the mount point from anywhere. The
> only function called by the VFS ist read_super, which does not get the
> information. If you want to autodetect, you have to play tricks with
> dcache and the path to your root inode.

If you move the call to shm_getname into lock_kernel/unlock_kernel,
you can be sure that by the time anything can access /var/shm,
shm_sb->s_root->d_covers will be valid. Maybe add a comment to
sys_mount to make sure that anybody trying to remove the big kernel
lock knows that they have to give shm another lock instead.

Probably a bit inefficient for sys_shmat, but then it's probably not
the type of system call that gets invoked a thousand times per second
anyway.

I think there are worse kludges in the kernel ;-)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH       werner.almesberger@ica.epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:16 EST