From 86e8a57c03c65eb1886b8ffb2027ce2e01cfffe9 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Sat, 10 Sep 2016 20:34:25 +1000 Subject: [PATCH] autofs: fix "fix dev ioctl number range check" 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 Signed-off-by: Ian Kent Signed-off-by: Andrew Morton --- fs/autofs4/autofs_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index dd71bd4ff903..477989d255be 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -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 #include -- 2.34.1