From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2873BC5AD4C for ; Wed, 15 Nov 2023 20:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344752AbjKOU6R (ORCPT ); Wed, 15 Nov 2023 15:58:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344674AbjKOU5i (ORCPT ); Wed, 15 Nov 2023 15:57:38 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8DC51987 for ; Wed, 15 Nov 2023 12:57:28 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F4A7C433AD; Wed, 15 Nov 2023 20:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700081243; bh=0QrraTHOAxWohOxVGpLrfdG8zENZSGYHeVYAMm7fIho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eQ74j3JphXmPt38/LbSMcNoP9QqUukJcdzHOpPrXo4Wx9tbt6WdKVA/QTOwcfDJwn xcKso3OmOn6QzrTadtCe9FKsgsnYj0kllngdVgiFj5a087OBTGiQPhGlTdgxguWPTD 9rN6MGYO+k/vg3ATfTD92G9XzfSfQMHs9W88vJKY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Phil Sutter , Florian Westphal , Sasha Levin Subject: [PATCH 5.15 037/244] netfilter: nf_tables: Drop pointless memset when dumping rules Date: Wed, 15 Nov 2023 15:33:49 -0500 Message-ID: <20231115203550.592878853@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115203548.387164783@linuxfoundation.org> References: <20231115203548.387164783@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Phil Sutter [ Upstream commit 30fa41a0f6df4c85790cc6499ddc4a926a113bfa ] None of the dump callbacks uses netlink_callback::args beyond the first element, no need to zero the data. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin --- net/netfilter/nf_tables_api.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 8a4cd1c16e0e4..8f12e83280cbd 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -3184,10 +3184,6 @@ static int __nf_tables_dump_rules(struct sk_buff *skb, goto cont_skip; if (*idx < s_idx) goto cont; - if (*idx > s_idx) { - memset(&cb->args[1], 0, - sizeof(cb->args) - sizeof(cb->args[0])); - } if (prule) handle = prule->handle; else -- 2.42.0