Hi Alan,

On Tue, 13 Feb 2001, Alan Cox wrote:
>> Yes, I understand that. But I never got any note that my fix is
>> broken and I still do not understand what's the concern.
> 
> Unless Im misreading the code the segment you poke at has
> potentially been freed before it is written too.

Oh yes I was blind, shame on me. Here comes a fixed version.

Greetings
                Christoph

--- 2.2.19-pre10/ipc/shm.c.orig Tue Feb 13 14:35:25 2001
+++ 2.2.19-pre10/ipc/shm.c      Tue Feb 13 14:34:49 2001
@@ -337,6 +337,8 @@
                if (current->euid == shp->u.shm_perm.uid ||
                    current->euid == shp->u.shm_perm.cuid || 
                    capable(CAP_SYS_ADMIN)) {
+                       /* Do not find it any more */
+                       shp->u.shm_perm.key = IPC_PRIVATE;
                        shp->u.shm_perm.mode |= SHM_DEST;
                        if (shp->u.shm_nattch <= 0)
                                killseg (id);

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

Reply via email to