From patchwork Thu Jan 7 14:48:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 12004305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3E7CC433E0 for ; Thu, 7 Jan 2021 14:50:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB6B9217A0 for ; Thu, 7 Jan 2021 14:50:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728843AbhAGOuN (ORCPT ); Thu, 7 Jan 2021 09:50:13 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:51833 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727327AbhAGOuM (ORCPT ); Thu, 7 Jan 2021 09:50:12 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 3923B1847; Thu, 7 Jan 2021 09:49:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 07 Jan 2021 09:49:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=FdIOkSGy3Q32J64k4 wf1rEB8FQzvb72uodaVN4t5/FA=; b=XmxbSqq0OVwNymfH4VfSU+F1bit0co3a7 I2XVLzjERh25Iv9JYHobrkBsvcbeheTDGr+qTwBCcGJ1JYndM4gsAxuWfnSP632K upo0nm5BttlNVWvkWl1paKv2tOQfum8kIffuz0jTfCH0v4nf2XL0I3ydvfi3OSY9 GKsF6ZRqYoUP+6Mh8kQqxmuPHj64QHJCY6qvHH6D7kcj6lAHDnR4xMf6ttHvwdL4 RM8yrB4cw/RLMIWmFteQRZV6Ash2i0VJDPrrGA956pf6qq9QVTUxK5iyBXVDPMaV kdOUiDYEereHMhFZI4025nuyvAkle6jImfRHVezKzrxWIW2JIeFnQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdegvddgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepteevgefhvefggfffkeeuffeuvdfhueehhe etffeikeegheevfedvgeelvdffudfhnecukfhppeekgedrvddvledrudehfedrgeegnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguohhstg hhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: from shredder.lan (igld-84-229-153-44.inter.net.il [84.229.153.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 6EB821080063; Thu, 7 Jan 2021 09:49:03 -0500 (EST) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, petrm@nvidia.com, dsahern@gmail.com, roopa@nvidia.com, nikolay@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH net 0/4] nexthop: Various fixes Date: Thu, 7 Jan 2021 16:48:20 +0200 Message-Id: <20210107144824.1135691-1-idosch@idosch.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel This series contains various fixes for the nexthop code. The bugs were uncovered during the development of resilient nexthop groups. Patches #1-#2 fix the error path of nexthop_create_group(). I was not able to trigger these bugs with current code, but it is possible with the upcoming resilient nexthop groups code which adds a user controllable memory allocation further in the function. Patch #3 fixes wrong validation of netlink attributes. Patch #4 fixes wrong invocation of mausezahn in a selftest. Ido Schimmel (3): nexthop: Fix off-by-one error in error path nexthop: Unlink nexthop group entry in error path selftests: fib_nexthops: Fix wrong mausezahn invocation Petr Machata (1): nexthop: Bounce NHA_GATEWAY in FDB nexthop groups net/ipv4/nexthop.c | 6 ++++-- tools/testing/selftests/net/fib_nexthops.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)