Skip to contentSkip to conversation

Patch "fs: compat: Remove warning from COMPATIBLE_IOCTL" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 3, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

fs: compat: Remove warning from COMPATIBLE_IOCTL

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
fs-compat-remove-warning-from-compatible_ioctl.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 9280cdd6fe5b8287a726d24cc1d558b96c8491d7 Mon Sep 17 00:00:00 2001

From: Mark Charlebois <[email protected]>
Date: Fri, 28 Apr 2017 15:15:12 -0700
Subject: fs: compat: Remove warning from COMPATIBLE_IOCTL

From: Mark Charlebois <[email protected]>

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 <[email protected]>

---
 fs/compat_ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/compat_ioctl.c +1 -1
@@ -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

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/fs-compat-remove-warning-from-compatible_ioctl.patch