Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp149824lqp; Wed, 20 Mar 2024 17:14:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrKDTGiw/oRXuxvFiHRemh7N/Reoa4q4FaCizzklR4uBTZNDp5w5G5tZZBSbH14eDybAnCLJUOUSzQuR+VaG1YKQnJtoELYNfhubOlEA== X-Google-Smtp-Source: AGHT+IHcd8B3gZx10y/ixsECiJc6fas46sbRVddGEatAlDWYf5ukA1jJvTpTuOpEDFPyIzqcv0Kn X-Received: by 2002:a05:6402:1cd0:b0:566:ca0:4a91 with SMTP id ds16-20020a0564021cd000b005660ca04a91mr14454805edb.2.1710980080299; Wed, 20 Mar 2024 17:14:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710980080; cv=pass; d=google.com; s=arc-20160816; b=sI8ZxgPy/+kyjtImKxZcE+CqMy09J5ibhE7qTT8EV1wKtzjRVt4YXNWOWGfm4PRGzs Pmy6+ef3F3i8QAXcxCXSE1rCW9SNLPhlOsWC4b76j1L7wDX1RKi5CUpN5fGokbjLLZRt T2xDzPXJGH3CnaVyX/ytytvMifWocnrUU3P8XmqIlBCET6m2RmMm5Ye+PUWlnPjCy2TQ gNfLSEuLXOPi5Ai6mWoYTF/T6fUkRyHFWJUHjmCOXn7zlb/FvGYnuNSzAKMPWngEyejb JgXrKN5713Rbr2m2r0g7a+uwDVBbtPPVEgpL5ASko6dpRGcJeTJKIS8tWKuk7bXI3oeG /kHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pyBatt9aFx0RwpN/n9HRNzymBlaZ5SXZq7hL1v52m7g=; fh=dK5q1+5K3h6mWoDEa7jl8dYP3xDFhMYF5vZ9uVV0gSI=; b=WYHWMkiXk07Z04tFxRZKPn8Vw0GTAipUbeV8tYpnXO61rO3zENfzyQiG1V+PH4UvmZ FhzSmDIpv+qDld16a7wmT3m/1Sfy7McwYCjthiuvQPixKZwnHmvBy3lqVyZIhhKJogwq jeYAG5Puwcz9PUQfKyV/PxPZjpjlPhnpmJl/s7ry+JwVdKzQIu+/TcetV7/jq4xOU96a I8n5ckNz/+iDI6w6T8jYQA1oGIpX0kwmmSxR+mrSEsXenpSTkLzPh41Qe/NvN1fDhwwb 8twOhH3+7qylwcFeNyXlMEESEuMyF81mc6Rrhd+E7GfMhsASSxxhrlpJHcn/fOxFyQ1n RScA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=oLml6oym; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-109514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id el8-20020a056402360800b00568d315b83esi3898344edb.10.2024.03.20.17.14.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 17:14:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=oLml6oym; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-109514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ED2551F216FF for ; Thu, 21 Mar 2024 00:14:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C871817F7; Thu, 21 Mar 2024 00:14:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="oLml6oym" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A462965F; Thu, 21 Mar 2024 00:14:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710980071; cv=none; b=jjH9WpQXpK5UiiIm6n3ZTR/FJwfBhFU5IqDHdfwsp3prLxJ7OyKFhJSHUSUpDK02l+BeTKu7p7RUw3q05zML8B52f+3YYaUnsDMT5OvXxaULhanGWYRke6KC+MinyaO4DjElWXbK2fV6W2ZPI2dcBGPaP39502aduRU8cy5ZMc0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710980071; c=relaxed/simple; bh=YGING0romE1l6bMQ4cDz8A1udigCDIqFS/DzUgtKzCI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jL0RYTI9C4vfHrehKrAqTJBAMISxAFx1lIfeNTWwcVXMhLMk6KneVO1eFKFFL28+cBlS2ruAM0KyF8FqxoO5oPLl4WTSXTA+O6TK6rWjePv9kd2f+4wic3WB7WEQ9OnS02YO55gE8IHmKcQIenPMuFcss+eZnfieEaR7nfqNylI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=oLml6oym; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=pyBatt9aFx0RwpN/n9HRNzymBlaZ5SXZq7hL1v52m7g=; b=oLml6oymGR3RU+hxWYtEnwxxN5 tVx/kjfJaaKlCDj2azhAFhnOyFmxtPTOH9RXlljg1nITmPao5FMBqvUDLuLGOpux08W+9VNxZmCNy AGiVMJy2/eU0Zo9P5kVPmhG3uNcWr73rxyOLDZTwauQ9MoX13+8yKiv9dHdsKirHg9sE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rn64Z-00ApI3-5z; Thu, 21 Mar 2024 01:14:19 +0100 Date: Thu, 21 Mar 2024 01:14:19 +0100 From: Andrew Lunn To: Elad Nachman Cc: taras.chornyi@plvision.eu, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, kory.maincent@bootlin.com, thomas.petazzoni@bootlin.com, miquel.raynal@bootlin.com, przemyslaw.kitszel@intel.com, dkirjanov@suse.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/5] net: marvell: prestera: fix memory use after free Message-ID: References: <20240320172008.2989693-1-enachman@marvell.com> <20240320172008.2989693-4-enachman@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240320172008.2989693-4-enachman@marvell.com> On Wed, Mar 20, 2024 at 07:20:06PM +0200, Elad Nachman wrote: > From: Elad Nachman > > Prestera driver routing module cleanup process would release memory, > then reference it again and eventually free it again the second time. > > Remove the redundant first memory free call. > All such double free calls were detected using KASAN. > > Fixes: 4394fbcb78cf ("net: marvell: prestera: handle fib notifications") > Signed-off-by: Elad Nachman Reviewed-by: Andrew Lunn Andrew