lkml.org 
[lkml]   [2000]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: 2.3.51: shm
From
Date
Lawrence Manning <lawrence@aslak.demon.co.uk> writes:

> I had to mount shm in order to do some testing, and now I find the
> following in my shm dir:
>
> [root@aslak /var]# ls shm/ -la
> total 4
> drwxrwxrwt 2 root root 0 Mar 12 15:50 /
> drwxrwxrwt 2 root root 0 Mar 12 15:50 ./
> drwxr-xr-x 16 root root 4096 Mar 12 15:40 ../
>
> What is that / file doing there?

This was an oversight while merging the /dev/zero stuff with shm fs.

Attached patch fixes this.

Greetings
Christoph

--- 2.3.51/ipc/shm.c Mon Mar 13 10:51:33 2000
+++ make51/ipc/shm.c Mon Mar 13 11:50:38 2000
@@ -435,6 +435,8 @@
default:
down(&shm_ids.sem);
for (; nr-2 <= shm_ids.max_id; nr++ ) {
+ if (nr-2 == zero_id)
+ continue;
if (!(shp = shm_get (nr-2)))
continue;
if (shp->shm_perm.mode & SHM_DEST)
@@ -462,8 +464,10 @@

down(&shm_ids.sem);
for(i = 0; i <= shm_ids.max_id; i++) {
+ if (i == zero_id)
+ continue;
if (!(shp = shm_lock(i)))
- continue;
+ continue;
if (!(shp->shm_perm.mode & SHM_DEST) &&
dent->d_name.len == shp->shm_namelen &&
strncmp(dent->d_name.name, shp->shm_name, shp->shm_namelen) == 0)
\
 
 \ /
  Last update: 2005-03-22 13:57    [from the cache]
©2003-2011 Jasper Spaans