From patchwork Mon Apr 24 17:49:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 9696821 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 F3FB1603F3 for ; Mon, 24 Apr 2017 17:49:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC3DC28307 for ; Mon, 24 Apr 2017 17:49:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0EE82841C; Mon, 24 Apr 2017 17:49:51 +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 129B2283FE for ; Mon, 24 Apr 2017 17:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S976287AbdDXRts (ORCPT ); Mon, 24 Apr 2017 13:49:48 -0400 Received: from mga09.intel.com ([134.134.136.24]:53726 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S976274AbdDXRti (ORCPT ); Mon, 24 Apr 2017 13:49:38 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2017 10:49:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,245,1488873600"; d="scan'208";a="849290320" Received: from theros.lm.intel.com ([10.232.112.77]) by FMSMGA003.fm.intel.com with ESMTP; 24 Apr 2017 10:49:36 -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 1/2] xfs: fix incorrect argument count check Date: Mon, 24 Apr 2017 11:49:31 -0600 Message-Id: <20170424174932.15613-1-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170421034437.4359-1-ross.zwisler@linux.intel.com> References: <20170421034437.4359-1-ross.zwisler@linux.intel.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP t_mmap_dio.c actually requires 4 arguments, not 3 as the current check enforces: usage: t_mmap_dio 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)