Messages in this thread Patch in this message |  | | Date | Fri, 26 Jul 1996 21:14:00 +0100 (BST) | From | Bryn Paul Arnold Jones <> | Subject | Re: 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 ;-) \____________________________________
|  |