Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp200050rwr; Thu, 4 May 2023 01:22:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6GeXu8EC8bvyqcNoEGRJ/E9ctPa+YohRunbyuTbhup8mx82ygvCxNKpAtLHhidiRzbKCQt X-Received: by 2002:a17:902:6941:b0:1a1:b440:3773 with SMTP id k1-20020a170902694100b001a1b4403773mr3026003plt.27.1683188526030; Thu, 04 May 2023 01:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683188526; cv=none; d=google.com; s=arc-20160816; b=fCLtzzeFwBC57rgCWCYH03j7y8AL41HMETR5QOabfr7Dn7JBjHaDEktN6R0E4lmy+T WwLY1eZOJ/ti+sTIwGewY67pouCBHGHHF5urVIqGjkV0Qjy85A6iY9Dz7u5wJTSJO0Yw Ra6v8SHMTt3Qs91Dt949cpCXMHhLQxQjpTOvlBqiiFxtA3LghaAAcw8PYRILwSAt+uvO rnKEnaTVAM4SL+nSBbFeYfP8adTiQadrCy2iUKA+HJfwxhcpMlRcTCF6Ns7b6UEArz6/ s73NxCuO5lG39nT6cGTmC12NsnW4wGSuRhrOWC9SxpisE3J7zrHjbLMiNcPk+Vf704hl wA6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t5Fzn7sSH30eZnhJgbFlp/OLTzY//SB/wNbmFGJfXPU=; b=G7YX+uk+IO0VXi05jSnRc4njfMsJiYqoFWuU7NDj77d5T7V8fnYQm4Wxsim26/9n3x jagzcj0kmSbGVtNG7tm6nuy8AXQfaMtuFJyDRojUgsYhUFDp/H2P0QT2gseQvVBqjLPq A3Uy2+aw4wr4lR89LP5lPk8k/vNGC4i+97oaznWgYuIsVp7SpLMW8nwv6WPf1klKhxuK bKTZBwXEqHyMqX83gZLfDvpnmnhlSYa+xbeFUbG8320W1Nm8vvpnVFIcf5UQcwCLbubh +FCMz0PCD86jDV/9WhiikVdIBU578bEhcy2nth6AdDkArOy4j+eQIENgc5JKzV2oLVfK PHRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F8OxTNd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a170902a70100b001a05347d092si31637147plq.642.2023.05.04.01.21.48; Thu, 04 May 2023 01:22:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F8OxTNd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230159AbjEDIRa (ORCPT + 99 others); Thu, 4 May 2023 04:17:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbjEDIQn (ORCPT ); Thu, 4 May 2023 04:16:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 665304ECF for ; Thu, 4 May 2023 01:12:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ECCFE6321B for ; Thu, 4 May 2023 08:12:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B469C433EF; Thu, 4 May 2023 08:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683187978; bh=lw5bGqmQmlqX8tgBw7ja1cDkM+Gc6V5MlhP8g2TZBng=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F8OxTNd+lz/QfW0Hy6B095VVDbNcaE/rWJFD5fkO6Zbpl30M/DmZKxyAjm6BWKinr /ooRbnD11pN5PryselhUk+LjMG2tF7NlyzUiOleQReuvmi9aGEKP43WaFiHphfAbV2 dJVCAIlif05C2Gjgk9P8gDvGObCCtR3fh5wO0n51j9U6rIZgU+HBEeeEiYPpBxXL59 I2aBXuqymUbqoZWYVetYrSrZT4IS0qxSrmL6GXjW1bLOElWk3o2Mz/FZ4wtMil7DIg eu3ZW86fXPiI+tnX25L/gOT9vF0bckzn2t5X+JPeXnituxejk2cV0qXyy5BzQYsP6S 5ZlQ/JHCdXXUQ== Date: Thu, 4 May 2023 11:12:53 +0300 From: Leon Romanovsky To: wei.fang@nxp.com Cc: claudiu.manoil@nxp.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: enetc: check the index of the SFI rather than the handle Message-ID: <20230504081253.GV525452@unreal> References: <20230504080400.3036266-1-wei.fang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230504080400.3036266-1-wei.fang@nxp.com> X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 04, 2023 at 04:03:59PM +0800, wei.fang@nxp.com wrote: > From: Wei Fang > > We should check whether the current SFI (Stream Filter Instance) table > is full before creating a new SFI entry. However, the previous logic > checks the handle by mistake and might lead to unpredictable behavior. > > Fixes: 888ae5a3952b ("net: enetc: add tc flower psfp offload driver") > Signed-off-by: Wei Fang > --- > drivers/net/ethernet/freescale/enetc/enetc_qos.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky