Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.3.9 /fs/locks.c

Filename:/fs/locks.c
Lines Added:8
Lines Deleted:5
Also changed in: (Previous) 2.3.8  2.3.1  2.2.9-ac6  2.2.9-ac5  2.2.9-ac4  2.2.9-ac3 
(Following) 2.3.10  2.3.15  2.3.45  2.3.99-pre4  2.3.99-pre6  2.4.9-ac1 

Location
[  2.3.9
  [  fs
     o  locks.c

Patch

diff -u --recursive --new-file v2.3.8/linux/fs/locks.c linux/fs/locks.c
--- v2.3.8/linux/fs/locks.c   Tue Jun 22 10:45:40 1999
+++ linux/fs/locks.c   Mon Jun 28 13:32:28 1999
@@ -563,11 +563,14 @@
    /* Candidates for mandatory locking have the setgid bit set
     * but no group execute bit -  an otherwise meaningless combination.
     */
-   if (IS_MANDLOCK(inode) &&
-       (inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
-      return (locks_mandatory_area(read_write, inode, filp, offset,
-                    count));
-   return (0);
+   if (IS_MANDLOCK(inode) && (inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) {
+      int retval;
+      lock_kernel();
+      retval = locks_mandatory_area(read_write, inode, filp, offset, count);
+      unlock_kernel();
+      return retval;
+   }
+   return 0;
 }
 
 int locks_mandatory_locked(struct inode *inode)


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.