Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp504146pxj; Tue, 18 May 2021 08:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB1wJi9bleKvPNeflzlKR0YY1ijIcw66QStqpaYudJEHqo6sKwxlgo1L4MONwlJ3H4BPu/ X-Received: by 2002:a05:6638:22b4:: with SMTP id z20mr5580885jas.128.1621350626686; Tue, 18 May 2021 08:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621350626; cv=none; d=google.com; s=arc-20160816; b=SEM7fQXWak0dxS5ofLMCnDDlK7xPDHXToTsHEVV1m+jJR6V6tjP9BT6dWVwFZsKbQ8 wa57oyp9Dr/I/eVaTTi4rBwh59HjF5RvIFqYZ+i1uzikRIs/J8melThRHILNBCqQ8KQz YK9dlLvSrotO2qBfrrNAxARlNsLUebCmSFMF6Al8rZ8Z29bvgahS2l/8B5Eql6fPNLrc We9t2wsdu/mDMsRnz+XOBq13TY1Os54NW7PQ7Lf/T1xWssgz8MAR/lpcMDXKBpyAggsF neUj+3rAO9K0XZMKXFqTrq25sYavKwhPwmLFbixbXklDirMbSbsYztU+inpRoToKFcJC VL1w== 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:dkim-signature; bh=1La8v2tGjuTTlepTdDUJO8ml4G6tiltN/P8TOR5297g=; b=xNkFBM5xU79zxDwgaOP8TXq2vEszINCiKGanjmb3ZWFCLCNhBKHI0i4ErwJEjCbHOv CLbMFylxWUH18nVXtL63QuxlrMwpuk3P1zAfkTK+39I6HPnf1+7w+FX+ht3vrf74lpoW JeyO8UmMw43v7KB0i9w2C8XQngJaOasvbLPH4XEmZ3Bq5FC/Do+cx445qExiAVwIQII6 QpbEai1KmrB9au/StEr3CdWMAxbW+aXft14sQizDUcDDn8zLOIowt1I3uDDxAHRQbC94 5at7jrvKOlrR5OezXgPspYQ8aPp2L5eRBYmZVr5stc7BXS5K58ANtX41UWjBEXKP9exT ybDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p0ku+QDe; 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=pass (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 q13si14291229jap.33.2021.05.18.08.09.56; Tue, 18 May 2021 08:10:26 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p0ku+QDe; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245194AbhEQPvh (ORCPT + 99 others); Mon, 17 May 2021 11:51:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:40236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343675AbhEQPel (ORCPT ); Mon, 17 May 2021 11:34:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7CEF761CDF; Mon, 17 May 2021 14:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262370; bh=sVWSqwsCjEediVEth53I4tx8AYE5sxNh7/5+UMoiWTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p0ku+QDeAoX31rQqXEL1Glo7VasRtJ5qR3BIh7NyeFO5qDWIXQxn+DGF1BwZaESKR 39h8WaXKtxkHEC1RAJVUxiC4bP5gYE30Mvgfj3a7wTma2V4aeWhDjQyrDE0EPE96rh d4jHl77CnPjgz+DcPt6SLQBagFS7UIBZf9jhwLuA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fernando Fernandez Mancera , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 173/289] ethtool: fix missing NLM_F_MULTI flag when dumping Date: Mon, 17 May 2021 16:01:38 +0200 Message-Id: <20210517140310.942145599@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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: Fernando Fernandez Mancera [ Upstream commit cf754ae331be7cc192b951756a1dd031e9ed978a ] When dumping the ethtool information from all the interfaces, the netlink reply should contain the NLM_F_MULTI flag. This flag allows userspace tools to identify that multiple messages are expected. Link: https://bugzilla.redhat.com/1953847 Fixes: 365f9ae4ee36 ("ethtool: fix genlmsg_put() failure handling in ethnl_default_dumpit()") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ethtool/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c index 50d3c8896f91..25a55086d2b6 100644 --- a/net/ethtool/netlink.c +++ b/net/ethtool/netlink.c @@ -384,7 +384,8 @@ static int ethnl_default_dump_one(struct sk_buff *skb, struct net_device *dev, int ret; ehdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, - ðtool_genl_family, 0, ctx->ops->reply_cmd); + ðtool_genl_family, NLM_F_MULTI, + ctx->ops->reply_cmd); if (!ehdr) return -EMSGSIZE; -- 2.30.2