lkml.org 
[lkml]   [1996]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: shmat() can crash kernel from user process
    On Fri, 26 Jul 1996, Ulrich Kunitz wrote:
    Nothing against this patch, but ....
    >
    > The problem seems to be architecture independent. Following patch should
    > solve the problem:
    >
    > diff -uNr linux-2.0.8/ipc/shm.c linux-2.0.8-shmat-patched/ipc/shm.c
    > --- linux-2.0.8/ipc/shm.c Fri Jul 26 10:52:04 1996
    > +++ linux-2.0.8-shmat-patched/ipc/shm.c Fri Jul 26 10:53:57 1996
    > @@ -467,6 +467,7 @@
    > int err;
    > unsigned int id;
    > unsigned long addr;
    > + unsigned long len;
    >
    > if (shmid < 0) {
    > /* printk("shmat() -> EINVAL because shmid = %d < 0\n",shmid); */
    ^^^^^^^^
    Shouldn't that "EINVAL" have a "-" before it (especially as it's in a
    printk() ).

    Bryn
    --
    PGP key pass phrase forgotten, \ Overload -- core meltdown sequence
    again :( | initiated.
    / This space is intentionally left
    | blank, apart from this text ;-)
    \____________________________________


    \
     
     \ /
      Last update: 2005-03-22 13:37    [W:0.017 / U:119.092 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site