James Hogan 6ae1756fad
MIPS: Drop spurious __unused in struct compat_flock
MIPS' struct compat_flock doesn't match the 32-bit struct flock, as it
has an extra short __unused before pad[4], which combined with alignment
increases the size to 40 bytes compared with struct flock's 36 bytes.

Since commit 8c6657cb50cb ("Switch flock copyin/copyout primitives to
copy_{from,to}_user()"), put_compat_flock() writes the full compat_flock
struct to userland, which results in corruption of the userland word
after the struct flock when running 32-bit userlands on 64-bit kernels.

This was observed to cause a bus error exception when starting Firefox
on Debian 8 (Jessie).

Reported-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: James Hogan <jhogan@kernel.org>
Tested-by: Peter Mamonov <pmamonov@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.13+
Patchwork: https://patchwork.linux-mips.org/patch/18646/
2018-02-20 15:46:44 +00:00
..
2018-02-07 11:22:44 -08:00
2017-11-03 09:02:30 -07:00
2017-11-15 11:36:08 -08:00
2016-04-03 12:32:09 +02:00
2014-01-22 20:19:02 +01:00
2017-09-06 11:01:52 +02:00
2017-08-29 15:21:50 +02:00
2018-01-24 11:17:20 +00:00
2017-11-15 11:36:08 -08:00
2017-08-29 15:21:51 +02:00
2017-11-03 09:02:30 -07:00
2014-08-26 02:18:56 +02:00
2014-05-24 00:07:01 +02:00
2016-05-28 12:35:06 +02:00
2017-09-04 13:53:14 +02:00
2017-11-03 09:02:30 -07:00
2017-11-03 09:02:30 -07:00
2017-11-03 09:02:30 -07:00
2017-11-03 09:02:30 -07:00
2017-11-03 09:02:30 -07:00
2017-11-09 13:25:44 +00:00
2017-06-08 14:51:58 +02:00
2017-11-15 18:21:03 -08:00
2017-11-03 09:02:30 -07:00
2017-10-09 14:53:56 +02:00
2017-03-28 16:43:25 -04:00
2014-08-02 00:06:38 +02:00
2014-01-22 20:19:02 +01:00
2016-04-03 12:32:09 +02:00
2017-11-03 09:02:30 -07:00
2017-06-28 12:22:39 +02:00
2017-05-27 15:38:02 -04:00
2016-05-09 12:00:02 +02:00
2017-11-03 09:02:30 -07:00