Jiri Kosina a27032eee8 sparc64: do not clobber personality flags in sys_sparc64_personality()
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>
2012-08-02 00:26:50 -07:00
..
2011-06-07 16:06:34 -07:00
2012-05-27 23:52:45 -07:00
2012-05-11 19:27:46 -07:00
2012-07-26 16:46:15 -07:00
2012-03-28 16:36:34 +02:00
2012-05-27 23:52:44 -07:00
2012-05-14 14:05:09 -07:00
2012-03-28 18:30:03 +01:00
2012-07-26 16:46:16 -07:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2012-06-01 12:58:52 -04:00
2012-06-01 12:58:52 -04:00
2012-06-01 12:58:52 -04:00
2012-06-24 11:03:52 -07:00
2012-03-28 18:30:03 +01:00