Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1089006imu; Wed, 9 Jan 2019 11:24:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN4PeyRgK1CSkU2lu+39YEoAOh3EzvAwVplPZYnu+ZQEIfoi3jR6vg0J0jRURcME5Sx9aIHc X-Received: by 2002:a17:902:6b87:: with SMTP id p7mr7421529plk.282.1547061881565; Wed, 09 Jan 2019 11:24:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547061881; cv=none; d=google.com; s=arc-20160816; b=vpb029thrYusdw2GMbtlCvNjwBCYXM1QqGt67Bgw2QqlLvRZfoSWb/CI22Tnyt0hDS 3uwWGLbUYvbEidAJcF8N5UxjM86Tqpg+n1TgFCCk1KwmN4uK1BBgg9DruaOYw77tEPfg 7wG9uD/W0H12sePUxyTFlg41hVgu63thUPz+nXHgWBeKzLJX9yRPhzQcz4FslPMnqBaW 8GWDUNUD9GBdGu9uPatJY+3ysTSPM2k4SMKgv9cTe0c0//CzunZVBUvwQx4jdQftDvT4 DqaOwUvYCeJBS9gmLv/tSZT2lsGWl8v7aG7oeCthNYlsWCaad5GB3iqOtKntNOOO1As+ nAAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=WSc14+6IyZ/+qpGAPLGvzuymwzrB/XkNpgoH++SKqPs=; b=UWmEdgtq89IUkjIUIQlVgbNrQ0WtRR5rSWHF8aVLlRxSKQcbufxU5ASyvJ2KuCj+1P E9Cu4CR4yrma14bzAs2tuNHriAfTwfH9hsorlmF0214Wh1aldXtq88GnDbwinqH2s70l /vd3hbW7VRlAzMrKekowb4SWYzWJlFqAvdUYSfdp/12zm4y4IySUZ2Iv0pSsFn7VkXEQ xtRx+wv5Nyw6zRLSVi1Ozv6xwwK/9I0ilFq44k60T26qmuqkS1jcAgYYbQ5R4A88v9Xi ZGbItfFT+fOaYap9F1IpdLgLpGe71VuNj48vNVZeYs/AbQi9W8KMS8q2UMjw3k9mYYLn L1mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a34si21019654pgm.427.2019.01.09.11.24.26; Wed, 09 Jan 2019 11:24:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728491AbfAITW4 (ORCPT + 99 others); Wed, 9 Jan 2019 14:22:56 -0500 Received: from ale.deltatee.com ([207.54.116.67]:59726 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728459AbfAITWt (ORCPT ); Wed, 9 Jan 2019 14:22:49 -0500 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ghJR2-00053p-GA; Wed, 09 Jan 2019 12:22:48 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1ghJR1-0001Ve-4X; Wed, 09 Jan 2019 12:22:39 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Dave Jiang , Serge Semin , Logan Gunthorpe Date: Wed, 9 Jan 2019 12:22:26 -0700 Message-Id: <20190109192233.5752-2-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20190109192233.5752-1-logang@deltatee.com> References: <20190109192233.5752-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, fancer.lancer@gmail.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.2 Subject: [PATCH v3 1/8] NTB: ntb_tool: reading the link file should not end in a NULL byte X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When running ntb_test this warning is issued: ./ntb_test.sh: line 200: warning: command substitution: ignored null byte in input This is caused by the kernel returning one more byte than is necessary when reading the link file. Reduce the number of bytes read back to 2 as it was before the commit that regressed this. Fixes: 7f46c8b3a552 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe Tested-by: Alexander Fomichev --- drivers/ntb/test/ntb_tool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c index d592c0ffbd19..ec5cf095cdb9 100644 --- a/drivers/ntb/test/ntb_tool.c +++ b/drivers/ntb/test/ntb_tool.c @@ -504,7 +504,7 @@ static ssize_t tool_peer_link_read(struct file *filep, char __user *ubuf, buf[1] = '\n'; buf[2] = '\0'; - return simple_read_from_buffer(ubuf, size, offp, buf, 3); + return simple_read_from_buffer(ubuf, size, offp, buf, 2); } static TOOL_FOPS_RDWR(tool_peer_link_fops, @@ -1690,4 +1690,3 @@ static void __exit tool_exit(void) debugfs_remove_recursive(tool_dbgfs_topdir); } module_exit(tool_exit); - -- 2.19.0