Re: [PATCH] shm fs v2 against 2.3.41

From: Christoph Rohland (hans-christoph.rohland@sap.com)
Date: Tue Feb 01 2000 - 07:46:25 EST


GOTO Masanori <gotom@debian.or.jp> writes:

> Calling shmget( key, size, shmflg ) with size = 0,
> I got an error EINVAL. The below patch fix it,
> please apply into 2.3.41+shmfs14 patch.
>
> ---------------------
> --- linux-2.3.41_shmfs14/ipc/shm.c Tue Feb 1 18:49:02 2000
> +++ linux-2.3.41_shmfs14_fixed/ipc/shm.c Tue Feb 1 18:57:52 2000
> @@ -660,7 +660,7 @@
> return -EINVAL;
> }
>
> - if (size < SHMMIN)
> + if ((size != 0) && (size < SHMMIN))
> return -EINVAL;
>
> down(&shm_ids.sem);
> ---------------------

Yes, I stumbled over that yesterday evening also. I will put out a new
patch soon.

> And now I have a question:
> I guess almost all users have no shmpath (default: /var/shm),
> and they maybe make a dir and have to mount it.
> IMHO, it is better to change that sysv shared memory works
> samely, whenever shmfs is not mounted. Is it feasible,
> or only my mistaken ?

This was my first attempt, but all the gurus opposed to that since
this needed some hacks to the VFS layer.

Since shmat, etc rely on the VFS functions, we have to mount the fs to
use these functions.

Greetings
                Christoph

-
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 : Mon Feb 07 2000 - 21:00:06 EST