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

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

Kernel v2.4.11 /kernel/exec_domain.c

Filename:/kernel/exec_domain.c
Lines Added:9
Lines Deleted:7
Also changed in: (Previous) 2.4.11-pre6  2.4.11-pre5  2.4.11-pre4  2.4.10-ac10  2.4.10-ac9  2.4.10-ac8 
(Following) 2.4.12-ac1  2.4.12-ac2  2.4.12-ac3  2.4.12-ac4  2.4.12-ac5  2.4.12-ac6 

Location
[  2.4.11
  [  kernel
     o  exec_domain.c

Patch

diff -u --recursive --new-file v2.4.10/linux/kernel/exec_domain.c linux/kernel/exec_domain.c
--- v2.4.10/linux/kernel/exec_domain.c   Sun Sep 23 11:41:01 2001
+++ linux/kernel/exec_domain.c   Thu Oct  4 16:41:54 2001
@@ -219,13 +219,15 @@
 asmlinkage long
 sys_personality(u_long personality)
 {
-   if (personality == 0xffffffff)
-      goto ret;
-   set_personality(personality);
-   if (current->personality != personality)
-      return -EINVAL;
-ret:
-   return (current->personality);
+   u_long old = current->personality;;
+
+   if (personality != 0xffffffff) {
+      set_personality(personality);
+      if (current->personality != personality)
+         return -EINVAL;
+   }
+
+   return (long)old;
 }
 
 


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