From patchwork Wed Apr 26 18:05:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 9701773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B9748603F6 for ; Wed, 26 Apr 2017 18:05:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B02D828634 for ; Wed, 26 Apr 2017 18:05:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2A0228645; Wed, 26 Apr 2017 18:05:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00CAC1FFD6 for ; Wed, 26 Apr 2017 18:05:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753769AbdDZSFl (ORCPT ); Wed, 26 Apr 2017 14:05:41 -0400 Received: from mga14.intel.com ([192.55.52.115]:20566 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753765AbdDZSFk (ORCPT ); Wed, 26 Apr 2017 14:05:40 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2017 11:05:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,255,1488873600"; d="scan'208";a="850119467" Received: from theros.lm.intel.com ([10.232.112.77]) by FMSMGA003.fm.intel.com with ESMTP; 26 Apr 2017 11:05:39 -0700 From: Ross Zwisler To: fstests@vger.kernel.org, Xiong Zhou , jmoyer@redhat.com, eguan@redhat.com Cc: Ross Zwisler , Christoph Hellwig , Dan Williams , "Darrick J. Wong" , Jan Kara , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, Andrew Morton Subject: [PATCH v3 1/2] xfs: fix incorrect argument count check Date: Wed, 26 Apr 2017 12:05:30 -0600 Message-Id: <20170426180531.26291-1-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.9.3 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP t_mmap_dio.c actually requires 4 arguments, not 3 as the current check enforces: # ./src/t_mmap_dio usage: t_mmap_dio # ./src/t_mmap_dio one two three open src(No such file or directory) len 0 (null) Signed-off-by: Ross Zwisler Fixes: 456581661b4d ("xfs: test per-inode DAX flag by IO") --- src/t_mmap_dio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_mmap_dio.c b/src/t_mmap_dio.c index 69b9ca8..6c8ca1a 100644 --- a/src/t_mmap_dio.c +++ b/src/t_mmap_dio.c @@ -39,7 +39,7 @@ int main(int argc, char **argv) char *dfile; unsigned long len, opt; - if (argc < 4) + if (argc < 5) usage(basename(argv[0])); while ((opt = getopt(argc, argv, "b")) != -1)