lkml.org 
[lkml]   [2001]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Linux 2.4.9-ac14
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Small addition to
> o Fix SEM_UNDO wrap bug (me, Leonid Igolnik)

Leonid

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7rPimRrKFtN3cJpMRAjLWAKDmWI/xSk5GxMhj7QIz5ETnAVVk/QCfQiKg
u46DXW6ur+ez7vZIPY8Z7zg=
=5gjb
-----END PGP SIGNATURE-----
diff -ub linux.ac/ipc/sem.c linux.lim/ipc/sem.c
--- linux.ac/ipc/sem.c Sat Sep 22 16:18:03 2001
+++ linux.lim/ipc/sem.c Sat Sep 22 16:07:01 2001
@@ -263,7 +263,7 @@
/*
* Exceeding the undo range is an error.
*/
- if(undo < -32767 || undo > 32767)
+ if (undo < (-SEMAEM - 1) || undo > SEMAEM)
{
/* Don't undo the undo */
sop->sem_flg &= ~SEM_UNDO;
diff -ub linux.ac/include/linux/sem.h linux.lim/include/linux/sem.h
--- linux.ac/include/linux/sem.h Wed Aug 15 17:21:11 2001
+++ linux.lim/include/linux/sem.h Sat Sep 22 15:54:17 2001
@@ -68,11 +68,11 @@
#define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
#define SEMOPM 32 /* <= 1 000 max num of ops per semop call */
#define SEMVMX 32767 /* <= 32767 semaphore maximum value */
+#define SEMAEM SEMVMX /* adjust on exit max value */

/* unused */
#define SEMUME SEMOPM /* max num of undo entries per process */
#define SEMMNU SEMMNS /* num of undo structures system wide */
-#define SEMAEM (SEMVMX >> 1) /* adjust on exit max value */
#define SEMMAP SEMMNS /* # of entries in semaphore map */
#define SEMUSZ 20 /* sizeof struct sem_undo */
\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.038 / U:2.116 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site