autofs: fix "fix dev ioctl number range check"
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 10 Sep 2016 10:34:25 +0000 (20:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sat, 10 Sep 2016 10:34:25 +0000 (20:34 +1000)
102a340f had a typo that made the count macro negative (-13).
The acutal check used by ioctl is ((cmd - cmd_first) > COUNT),
so it needs to be positive (13).

102a340f is a commit in linux-next which hasn't been merged
to mainline upstream.

Link: http://lkml.kernel.org/r/20160831033420.9910.16809.stgit@pluto.themaw.net
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/autofs4/autofs_i.h

index dd71bd4ff903bed270098daff620e4c47854d70d..477989d255bef9d5ae307de49f446b32e802271a 100644 (file)
@@ -21,7 +21,7 @@
 
 #define AUTOFS_DEV_IOCTL_IOC_FIRST     (AUTOFS_DEV_IOCTL_VERSION)
 #define AUTOFS_DEV_IOCTL_IOC_COUNT \
-       (AUTOFS_DEV_IOCTL_VERSION_CMD - AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD)
+       (AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD - AUTOFS_DEV_IOCTL_VERSION_CMD)
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
This page took 0.037565 seconds and 5 git commands to generate.