Files
linux/arch/sparc/kernel
Jiri Kosina 6c2bbdc7f8 sparc64: do not clobber personality flags in sys_sparc64_personality()
[ Upstream commit a27032eee8 ]

There are multiple errors in how sys_sparc64_personality() handles
personality flags stored in top three bytes.

- directly comparing current->personality against PER_LINUX32 doesn't work
  in cases when any of the personality flags stored in the top three bytes
  are used.
- directly forcefully setting personality to PER_LINUX32 or PER_LINUX
  discards any flags stored in the top three bytes

Fix the first one by properly using personality() macro to compare only
PER_MASK bytes.
Fix the second one by setting only the bits that should be set, instead of
overwriting the whole value.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28 10:02:13 -07:00
..
2011-06-07 16:06:34 -07:00
2011-06-07 16:06:34 -07:00
2009-08-10 09:35:00 +02:00
2012-04-22 16:21:24 -07:00
2011-03-31 11:26:23 -03:00
2010-09-22 16:35:09 -04:00
2011-03-16 18:19:15 -07:00
2011-08-15 18:31:41 -07:00
2011-03-29 14:48:14 +02:00
2011-03-30 17:37:56 -07:00
2011-06-07 16:06:34 -07:00
2011-06-07 16:06:34 -07:00
2011-04-19 22:11:40 -07:00
2011-04-19 22:11:40 -07:00
2011-05-28 10:48:39 -07:00
2011-06-07 16:06:34 -07:00
2009-07-12 12:22:34 -07:00
2011-06-07 16:06:34 -07:00