From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796094025; b=cJkrhMK6Pu9sWlD1eMgvWHuMXgx6aFK8G7LX5qAhc/4/fPpfijwIQ3UZIclUrVZz01YU eB+lUd+YFpM4q5CAKctU2kswwoBOsG1XNOJ/ayzqnxe0NZKIpnYxxpSbm2gYOcxVCw/ek 6/zKgXr+sgimV5EWVwpwB/CPZhCk1aSEtdt9EoPMl9uMZr2gwBx7ucB4j1OMEbmzXDTSg Dfca252pBRFtftXMqPad2eBTQmZrOI1j0XTbsF8Al/6r0w0Pt1iaG4oxNJII7F21ll61a aYqov9/pa2mMyFU4oJ1NhwBhUwRBVIFTMKMY4J4IviP3cw/gkfknfsIX2/N0l63WC3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796094025; h=Received:DKIM-Signature:Received:Content-Type:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=/IyET+p/m+U4hPKNdoyow8e9ogx1/W5sSK5xDJiFuDc=; b=oW27sCCkrK1/crZDv2XqwgiMCLuf7/adsH6SdX9n6Oim6Bdq8kYFl1i7cvC6f1XWHupQ 9LgBqzZLk6t9L7XSU37OSW7F3JEx8SjgeT7/Ww5KJfs2Csx1BGpSteIIPyQasE2dWiV7U LhmAvxsqFnfUbd/jgGT0oubB99azHz6oLohDof3tLEVjlbWaLUaEvWsrGKtoKQBd57S1G ++z28fULLMkZmgqeQ7L3CAHV9w3PoAUAzLibEwY0jDlZVI3k9gB7fRs9bsEifpNdu6YWS GcyAubhu4/UzN7LnoMGA2FkDBSSCxmYvrx47epOnhiBLlrres+maqXNEwK+plmdWMIQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QTCYtynF; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8941B606A680; Tue, 1 Dec 2026 03:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QTCYtynF Received: by smtp.kernel.org (Postfix) with ESMTPSA id B74711F0092F; Tue, 1 Dec 2026 03:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796094024; bh=/IyET+p/m+U4hPKNdoyow8e9ogx1/W5sSK5xDJiFuDc=; h=Subject:From:Date:References:In-Reply-To:To:Cc; b=QTCYtynFkgqVyj+a90qAIO0riSGxugGHLdyU1c8XVa3557yBKeOR/MvEQcuSlcLAp wzvlQKQihFTdTqMW9gErS2E45JjetZE9HV+xvRebbLnNj41tk0VvgIq2kv/gNVx1h5 x6JQnH95lp78sVZ8eED6VHome20Tc5nP/7+57cCx4BrXWHr4Y0grA/j7jgTECVOn4x O71JQtVuemtuWPYt7QxnFijXDi4iCAk63tIW/WyWJJ/W2Wcd2CAbb14eO2Z5s+TC9N jviE/5Ign2qZxbYBnDBIOdsbv15KXLY20X/Re8VkxOBY6NvoxTctbXPxpjDRdd3bEU 8jVMTjEb3vJcg== Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id AE88A38068C0; Tue, 1 Dec 2026 03:00:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net] octeontx2-pf: handle cn20k_pfvf_mbox_alloc() failure in otx2_pfvf_mbox_init() From: patchwork-bot+netdevbpf@kernel.org Message-Id: <179609402324.4152033.14536434502883640746.git-patchwork-notify@kernel.org> Date: Tue, 01 Dec 2026 03:00:23 +0000 References: <20261120192408.2872793-1-elkin@google.com> In-Reply-To: <20261120192408.2872793-1-elkin@google.com> To: Elkin Cruz Cc: sgoutham@marvell.com, gakula@marvell.com, rkannoth@marvell.com, sbhatta@marvell.com, bbhushan2@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, irogers@google.com Hello: This patch was applied to netdev/net-next.git (main) by Willem de Bruijn : On Fri, 20 Nov 2026 19:24:08 +0000 you wrote: > On CN20K, cn20k_pfvf_mbox_alloc() returns ERR_PTR(-ENOMEM) when > qmem_alloc() fails, but otx2_pfvf_mbox_init() assigns hwbase without > checking IS_ERR(hwbase). On allocation failure, the error pointer is > passed directly into otx2_mbox_init(), which writes reset headers to > hwbase + devid * MBOX_SIZE and crashes the kernel. > > In addition, if otx2_mbox_init() fails on CN20K after > cn20k_pfvf_mbox_alloc() succeeded, free_iomem: skips > qmem_free(&pf->pdev->dev, pf->pfvf_mbox_addr), leaking the DMA mailbox > allocation, and if the second otx2_mbox_init(&mbox->mbox_up, ...) call > fails, &mbox->mbox is not destroyed. > > [...] Here is the summary with links: - [net] octeontx2-pf: handle cn20k_pfvf_mbox_alloc() failure in otx2_pfvf_mbox_init() https://git.kernel.org/netdev/net-next/c/1fdb3da048ab You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html