lkml.org 
[lkml]   [2001]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.2.19pre10
On Mon, 12 Feb 2001, Alan Cox wrote:

> 2.2.19pre10
> o Revert shm change - its unsafe (Richard Nelson)
>
> [...]
>
> 2.2.19pre3
> o Fix IPC_RMID behaviour (Christoph Rohland)
>

Ack...

First, I'm glad I wasn't hallucinating, and that the mail did indeed get
seen by someone.

Second, instead of reverting, can't we simply move those two lines up a
bit:
case IPC_RMID:
if (current->euid == shp->u.shm_perm.uid ||
current->euid == shp->u.shm_perm.cuid ||
capable(CAP_SYS_ADMIN)) {
shp->u.shm_perm.mode |= SHM_DEST;
+ /* Do not find it any more */
+ shp->shm_perm.key = IPC_PRIVATE;
if (shp->u.shm_nattch <= 0)
killseg (id);
break;

This way, we're not violating specs, programs work, *and* we're not
touching freshly kfree()d storage?

--
Rick Nelson
DOS: n., A small annoying boot virus that causes random spontaneous system
crashes, usually just before saving a massive project. Easily cured by
UNIX. See also MS-DOS, IBM-DOS, DR-DOS.
(from David Vicker's .plan)

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

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.077 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site