Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp861462lko; Tue, 13 Jul 2021 11:41:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIvTSUjInyeJCcGL8ElfgRJnlxST2p2gW7i1sq1clz2nhchDNt2kxuouNBcuqRdBfWHYBz X-Received: by 2002:a6b:b2d1:: with SMTP id b200mr4178039iof.187.1626201664435; Tue, 13 Jul 2021 11:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626201664; cv=none; d=google.com; s=arc-20160816; b=pWC30ZSqT747PO+5NJVmIeWXnCFgeARxXKznbTp9rmkMjrmzx5uaIr29QQL23+l5Kr YVnQJBmkk/1FuRnQ8T54iq5VGWQGRZ6F6+xQiP4Yx86RNXtlnJChff6UNxMSfw5colDj KOXYHr0cxY/ryDnc+c/2lMfkb8F0zpkQL+M9wY/ps25Z+qT+nBqW3sJDezworYeMFMrY mwz6vXpV+cZM4vZyXi2X6cnfUz7GH9iUgXn6muBwq8SjUKJq0J8ugyPF10oNcXS/Jx9j ZQ016FpvqGhvuPhGOLo/V/ou4MS/c/Q+ZpxHoWCfBxdBcobifkpgOjTpSjYyPhQEH5hS EMOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=hXULMCGgvRXcT9tUfJxuM5H4ibvcX+Btbu4odvEty+8=; b=LKuP914XGsuauNPVcgoRRZe9CwS3OePG5AASG6E2OvzSSK7Xjei9cZ4wLMOCFGM4QS Fun75QACWXywUVkZ8imhSgDaNR9oVAw7Yaozlr5WyvNq84a/6LTOzBr4aIsdGouMTg5o /ozpahT1njPf4xO/uzuTkmHUlfyeLRJOdpP1QnM1wxq6IeqMvImQZzCHX1fyRHkHD3LD +Yti1znAd0JkNIayAcpAHyggjY0KWsrQi4Vm92TOkT3pGK4LiQNv9r+rCHaf+gePLsXB JTaW0E3T5EeFq6IKSO8ocVFYy81IG5dR6Q+OEXaHO7TSyO96SZbrVs90tiW2LBCPscwI Ia6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si15570396ilg.108.2021.07.13.11.40.46; Tue, 13 Jul 2021 11:41:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234326AbhGMSmy (ORCPT + 99 others); Tue, 13 Jul 2021 14:42:54 -0400 Received: from mail.netfilter.org ([217.70.188.207]:38740 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbhGMSmx (ORCPT ); Tue, 13 Jul 2021 14:42:53 -0400 Received: from netfilter.org (unknown [90.77.255.23]) by mail.netfilter.org (Postfix) with ESMTPSA id 2DDF062437; Tue, 13 Jul 2021 20:39:45 +0200 (CEST) Date: Tue, 13 Jul 2021 20:40:02 +0200 From: Pablo Neira Ayuso To: Felix Fietkau Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, ryder.lee@mediatek.com Subject: Re: [RFC 3/7] net: ethernet: mtk_eth_soc: implement flow offloading to WED devices Message-ID: <20210713184002.GA26070@salvia> References: <20210713160745.59707-1-nbd@nbd.name> <20210713160745.59707-4-nbd@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210713160745.59707-4-nbd@nbd.name> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, Jul 13, 2021 at 06:07:41PM +0200, Felix Fietkau wrote: [...] > diff --git a/net/core/dev.c b/net/core/dev.c > index c253c2aafe97..7ea6a1db0338 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -885,6 +885,10 @@ int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr, > if (WARN_ON_ONCE(last_dev == ctx.dev)) > return -1; > } > + > + if (!ctx.dev) > + return ret; This is not a safety check, right? After this update ctx.dev might be NULL? > + > path = dev_fwd_path(stack); > if (!path) > return -1; > -- > 2.30.1 >