cross-arch: don't corrupt personality flags upon exec()
[linux-3.10.git] / arch / sh / include / asm / elf.h
index f38112b..37924af 100644 (file)
@@ -183,7 +183,8 @@ do {                                                                        \
 } while (0)
 #endif
 
-#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)
+#define SET_PERSONALITY(ex) \
+       set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK)))
 
 #ifdef CONFIG_VSYSCALL
 /* vDSO has arch_setup_additional_pages */