From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com ([66.111.4.28]:32988 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759015AbcHaDea (ORCPT ); Tue, 30 Aug 2016 23:34:30 -0400 Subject: [PATCH 3/3] autofs: fix "fix dev ioctl number range check" From: Ian Kent To: Andrew Morton Cc: linux-fsdevel , Tomohiro Kusumi , autofs mailing list , Kernel Mailing List Date: Wed, 31 Aug 2016 11:34:20 +0800 Message-ID: <20160831033420.9910.16809.stgit@pluto.themaw.net> In-Reply-To: <20160831033409.9910.77067.stgit@pluto.themaw.net> References: <20160831033409.9910.77067.stgit@pluto.themaw.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Tomohiro Kusumi 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. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- 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 4404a22..a1fba42 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