Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2881280pxu; Sat, 19 Dec 2020 05:11:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDD3m7Io+60bMYHUz+QgSWAj41syDk8Dwl+7Mq+TLXS36s3AD51sOk2LbfaoDtI2MkR53C X-Received: by 2002:a17:906:71ca:: with SMTP id i10mr8065580ejk.528.1608383466556; Sat, 19 Dec 2020 05:11:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608383466; cv=none; d=google.com; s=arc-20160816; b=cGzBaiXWikbIpgZDBjyCiBP6CLqKd+8WCT4zXQ8eQvsDWyPGN+/dvDiuTzEmho7xA6 qEfcfBxEd+S4p0cAvm6PfO/nHwsGW16nDOKjMW9Lkzzt2fn5knpf78NVO3zhr47ZJvHj UMHOggQAsLcIbXeu8KjApzEyJOYNH1m8pbCWaUqO2tYPnzfH2EtHsR5TpXcP66G+ZIum TEuH3c64lun6kWnhXVrGe8zMMDpZWWjFy7Gt/dfcdMiGYU2pmwFPqeNtJt2pTlHAVdBm Hr984g9T7f2Fl1mziw3PytPFeDscywQIvH+pz4MsgMIhZCYFOR5Vjljj3XYMBmeIkw+w OdDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=3w0hiowL0ICNM++LgNu3kd/1Kc6O5BLd1eTnm6MjyWc=; b=ImOU8+EWEVi6kZQFpa6+3lH2aumr0mJZ/JxbNYkldGzb5iGQSz0KbRaOT2zgyj8Ry/ wcmz7kYxUN8jcCpGCqLQuJa4XYTGdb792KpFVKEUQV2msUzowtyNqZYqtU+di6AGKDs2 +NMT8fZ3vRatbZNExjg5vA/CT1M2wZ9lhoCB8C4we3h0BMx5GtgMKLO0NEOdEfKzQi+B uZbKARByPht4R5PZ0aSyB2dS2qYNSEcu75IeCaQZ6VxBPmQ9uqyvBZnkAmIwLSw3UBoW HYtXNubAWRLUtGuPHPi5xsW93EdYAARPNw5rJO+L2mdPBcq63VNBJaAjQi3qcRHhlf53 Smlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ot14si5982757ejb.493.2020.12.19.05.10.44; Sat, 19 Dec 2020 05:11:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727666AbgLSNH2 (ORCPT + 99 others); Sat, 19 Dec 2020 08:07:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:45032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727536AbgLSM62 (ORCPT ); Sat, 19 Dec 2020 07:58:28 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jianguo Wu , Florian Westphal , Jakub Kicinski Subject: [PATCH 5.9 13/49] mptcp: print new line in mptcp_seq_show() if mptcp isnt in use Date: Sat, 19 Dec 2020 13:58:17 +0100 Message-Id: <20201219125345.327202354@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219125344.671832095@linuxfoundation.org> References: <20201219125344.671832095@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jianguo Wu [ Upstream commit f55628b3e7648198e9c072b52080c5dea8678adf ] When do cat /proc/net/netstat, the output isn't append with a new line, it looks like this: [root@localhost ~]# cat /proc/net/netstat ... MPTcpExt: 0 0 0 0 0 0 0 0 0 0 0 0 0[root@localhost ~]# This is because in mptcp_seq_show(), if mptcp isn't in use, net->mib.mptcp_statistics is NULL, so it just puts all 0 after "MPTcpExt:", and return, forgot the '\n'. After this patch: [root@localhost ~]# cat /proc/net/netstat ... MPTcpExt: 0 0 0 0 0 0 0 0 0 0 0 0 0 [root@localhost ~]# Fixes: fc518953bc9c8d7d ("mptcp: add and use MIB counter infrastructure") Signed-off-by: Jianguo Wu Acked-by: Florian Westphal Link: https://lore.kernel.org/r/142e2fd9-58d9-bb13-fb75-951cccc2331e@163.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/mptcp/mib.c | 1 + 1 file changed, 1 insertion(+) --- a/net/mptcp/mib.c +++ b/net/mptcp/mib.c @@ -58,6 +58,7 @@ void mptcp_seq_show(struct seq_file *seq for (i = 0; mptcp_snmp_list[i].name; i++) seq_puts(seq, " 0"); + seq_putc(seq, '\n'); return; }