Dmitry V. Levin 525fd5a94e sparc64: fix incorrect sign extension in sys_sparc64_personality
The value returned by sys_personality has type "long int".
It is saved to a variable of type "int", which is not a problem
yet because the type of task_struct->pesonality is "unsigned int".
The problem is the sign extension from "int" to "long int"
that happens on return from sys_sparc64_personality.

For example, a userspace call personality((unsigned) -EINVAL) will
result to any subsequent personality call, including absolutely
harmless read-only personality(0xffffffff) call, failing with
errno set to EINVAL.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-14 13:06:09 -05:00
..
2014-05-18 19:01:30 -07:00
2014-05-18 19:01:29 -07:00
2012-07-26 16:46:15 -07:00
2015-03-19 18:54:49 -07:00
2015-05-05 13:35:39 -06:00
2014-08-26 13:45:55 -04:00
2015-03-19 10:17:22 -05:00
2014-05-18 19:01:29 -07:00
2014-08-26 13:45:55 -04:00
2014-12-14 16:10:09 -08:00
2015-03-19 18:54:49 -07:00
2013-06-13 22:12:14 +01:00
2012-03-28 18:30:03 +01:00
2014-08-26 13:45:55 -04:00
2014-07-21 22:27:56 -07:00
2014-12-13 12:42:51 -08:00
2014-09-30 14:17:08 -07:00