4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mark Charlebois <charl...@gmail.com>

commit 9280cdd6fe5b8287a726d24cc1d558b96c8491d7 upstream.

cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a
warning about an overflow in XFORM.

From: Mark Charlebois <charl...@gmail.com>
Signed-off-by: Mark Charlebois <charl...@gmail.com>
Signed-off-by: Behan Webster <beh...@converseincode.com>
Signed-off-by: Matthias Kaehlcke <m...@chromium.org>
Acked-by: Arnd Bergmann <a...@arndb.de>
Signed-off-by: Al Viro <v...@zeniv.linux.org.uk>
Cc: Nathan Chancellor <natechancel...@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 fs/compat_ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -833,7 +833,7 @@ static int compat_ioctl_preallocate(stru
  */
 #define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff)
 
-#define COMPATIBLE_IOCTL(cmd) XFORM(cmd),
+#define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd),
 /* ioctl should not be warned about even if it's not implemented.
    Valid reasons to use this:
    - It is implemented with ->compat_ioctl on some device, but programs


Reply via email to