Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3081398pxj; Mon, 17 May 2021 17:17:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeOqYF1mfQ2Zsp3OyI63v+Z457CAgjzJDUShT+21n3Ef5SborVXXBJap7+W0ePeyS4padx X-Received: by 2002:a17:906:26ce:: with SMTP id u14mr2804981ejc.187.1621297053890; Mon, 17 May 2021 17:17:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621297053; cv=none; d=google.com; s=arc-20160816; b=PpLkS+0Y9Ur1nm9HP/OWL8IWz8vra3jOAtTl/3ER1gEbNGkpad5oYnsqeqf72GslLP 1lk8QPnz8C1dnSCrhd1otcFPXKnVmnSftJGdNwFp8kebD7+sIkeXuOXGVyDTHus6MFG8 UuncY8chFFylrkktC3YcQnb6qy3TOKgAkjQz0J2pY1WApVuWlFY/CMGNQup4EYOZVpF/ qnAlWlogiCOPOt1lTzTDBTLv/+75hdIo4nJeP27uK3DUxQTftFpNLP3wou3Pro3h+DIj 9gxkSs2rGrBR8sxR58M0jf6iBZ0bnzquiHhFyWkneb9pUVO8BDpV0cTqk575+fQvk0C8 m8yw== 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=J+KjVC9jSKHAK+Y3kEd0y8N/uQliDw7kNA7CuAxEZQ78M9rJcVO7XAnfV+HjQHZYC2 XX8TN0M/GCGLl4EYKRLFRbQm1Gfd2QBskHLGwSZz7ScE+l4oPHBP+YvhXr+eMOcXw2qf nLDtrup6grjdiTtonJU0qgeP1nfsO7iIA+jwqKvqglq/Ovo+P0scNOvCg/2weR5lOlui 1O98myefxAHMyc5/woccW9mRhCAqHlv1d9ZABvkyxlcterfc6fGOE90gQ45jPZeV5OH1 ar5SW+6yvnJgjAvlWi9JIyV9XN4CWscC9hmPMA10A0dkOGNeLcM/TmpTtdE52ThRVRzS J7dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ec2bmWBe; 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 s18si17937555ejh.110.2021.05.17.17.17.11; Mon, 17 May 2021 17:17:33 -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=ec2bmWBe; 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 S237815AbhEQO1x (ORCPT + 99 others); Mon, 17 May 2021 10:27:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:52996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239444AbhEQOYH (ORCPT ); Mon, 17 May 2021 10:24:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C0236613CD; Mon, 17 May 2021 14:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260752; bh=sVWSqwsCjEediVEth53I4tx8AYE5sxNh7/5+UMoiWTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ec2bmWBe3SwL1wMQ5vHxXMHdqQyGIAdMIXe8dIZHtfcx7swLva3JaA6H48BcgJUjI T0SWF6SFg1QFCvZahIcQtkdmX7ECqjyi4ygIPBLuJclLb9ra5J11sr33MpGFZPz6cY UOpuwqBbR3787A+9+/FKKoGFlUGRu4AUBQsCvxCk= 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.12 225/363] ethtool: fix missing NLM_F_MULTI flag when dumping Date: Mon, 17 May 2021 16:01:31 +0200 Message-Id: <20210517140310.198118260@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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