lkml.org 
[lkml]   [1996]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
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    [from the cache]
©2003-2011 Jasper Spaans