https://github.com/torvalds/linux
Revision d8b295f29091310d746509bb6d5828aaf4907a18 authored by Russell King on 10 November 2006, 20:27:53 UTC, committed by Linus Torvalds on 13 November 2006, 15:40:42 UTC
If you call set_personality() with an expression such as:

	set_personality(foo ? PERS_FOO1 : PERS_FOO2);

then this evaluates to:

	((current->personality == foo ? PERS_FOO1 : PERS_FOO2) ? ...

which is obviously not the intended result.  Add the missing parents
to ensure this gets evaluated as expected:

	((current->personality == (foo ? PERS_FOO1 : PERS_FOO2)) ? ...

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent e40c675
History
Tip revision: d8b295f29091310d746509bb6d5828aaf4907a18 authored by Russell King on 10 November 2006, 20:27:53 UTC
[PATCH] Fix missing parens in set_personality()
Tip revision: d8b295f
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 542 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 88.2 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 73.8 KB
Makefile -rw-r--r-- 49.0 KB
README -rw-r--r-- 16.2 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top