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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_MUTT 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 5385BC31E5B for ; Wed, 19 Jun 2019 19:41:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D1CC21721 for ; Wed, 19 Jun 2019 19:41:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="rBipBGwr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730066AbfFSTlN (ORCPT ); Wed, 19 Jun 2019 15:41:13 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50311 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfFSTlN (ORCPT ); Wed, 19 Jun 2019 15:41:13 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 294872104A; Wed, 19 Jun 2019 15:41:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 19 Jun 2019 15:41:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=OMe9fw 3KZG3r+NteQ/iy/R2/v9HNAoflytVf85hj7+s=; b=rBipBGwrgxLMocd7U31YE4 ZuIj2pJwZseaa0jTnAd9Zm93YfcOTcnBfE5r6fIDwEu9uTHtAKYKh3YIJ31+5434 hqQLGbZFJgplY1HfNfapiL7anMjQUHRlzyShvMOmcVsyB/290aVEhWlaTkvF6hT7 S3lYhjwQkpIxFNQSORfE5ddwo2AiRg4ARBZ4cARFhTAn57nKXeH9v2fCrgPC8UzV 6xkJCLN/gCQu66yBD0MzishDpdfSNgzCeyORZowVlcxJe3ar7br2CrIuyRsyRhyG H3gXgSnG+8DTpsy0Gir8NnvRRxSXW//m8Pt7kCZLX229uUVkPbJ2SH2kR5rKLMJA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrtddvgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjfgesthdtredttdervdenucfhrhhomhepkfguohcu ufgthhhimhhmvghluceoihguohhstghhsehiughoshgthhdrohhrgheqnecukfhppeejje drudefkedrvdegledrvddtleenucfrrghrrghmpehmrghilhhfrhhomhepihguohhstghh sehiughoshgthhdrohhrghenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (unknown [77.138.249.209]) by mail.messagingengine.com (Postfix) with ESMTPA id 2F46C80063; Wed, 19 Jun 2019 15:41:08 -0400 (EDT) Date: Wed, 19 Jun 2019 22:40:58 +0300 From: Ido Schimmel To: David Ahern Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@mellanox.com, Ido Schimmel Subject: Re: [PATCH net-next] ipv6: Check if route exists before notifying it Message-ID: <20190619194058.GA8498@splinter> References: <20190619175500.7145-1-idosch@idosch.org> <69f3262d-e6d0-943e-20a0-c711be4d35d7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <69f3262d-e6d0-943e-20a0-c711be4d35d7@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jun 19, 2019 at 01:10:08PM -0600, David Ahern wrote: > On 6/19/19 11:55 AM, Ido Schimmel wrote: > > diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c > > index 1d16a01eccf5..241a0e9a07c3 100644 > > --- a/net/ipv6/ip6_fib.c > > +++ b/net/ipv6/ip6_fib.c > > @@ -393,6 +393,8 @@ int call_fib6_multipath_entry_notifiers(struct net *net, > > .nsiblings = nsiblings, > > }; > > > > + if (!rt) > > + return -EINVAL; > > rt->fib6_table->fib_seq++; > > return call_fib6_notifiers(net, event_type, &info.info); > > } > > The call to call_fib6_multipath_entry_notifiers in > ip6_route_multipath_add happens without rt_notif set because the MPATH > spec is empty? There is a nexthop in the syzbot reproducer, but its length is shorter than sizeof(struct rtnexthop). > It seems like that check should be done in ip6_route_multipath_add > rather than call_fib6_multipath_entry_notifiers with an extack saying > the reason for the failure. It seemed consistent with ip6_route_mpath_notify(). We can check if rt6_nh_list is empty and send a proper error message. I'll do that tomorrow morning since it's already late here. > My expectation for call_fib6_multipath_entry_notifiers is any errors are > only for offload handlers. (And we need to get extack added to that for > relaying reasons.) We already have extack there...