lkml.org 
[lkml]   [1997]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectypbind bug in SMP test kernel fixed...

Here is a patch for that silly bug. This goes on top of the patch I
just posted.

--- linux/ipc/sem.c.~1~ Sat Jan 4 22:59:40 1997
+++ linux/ipc/sem.c Wed Jan 22 23:14:09 1997
@@ -499,9 +499,10 @@
goto out;
copy_from_user (sem_io, array, nsems*sizeof(ushort));
for (i = 0; i < nsems; i++)
- err = -ERANGE;
- if (sem_io[i] > SEMVMX)
+ if (sem_io[i] > SEMVMX) {
+ err = -ERANGE;
goto out;
+ }
break;
case IPC_STAT:
buf = arg.buf;
@@ -640,9 +641,10 @@
if (!un) {
size = sizeof(struct sem_undo) + sizeof(short)*sma->sem_nsems;
un = (struct sem_undo *) kmalloc(size, GFP_ATOMIC);
- error = -ENOMEM;
- if (!un)
+ if (!un) {
+ error = -ENOMEM;
goto out;
+ }
memset(un, 0, size);
un->semadj = (short *) &un[1];
un->semid = semid;
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.019 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site