From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 10D683C73F6; Tue, 21 Jul 2026 22:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784673905; cv=none; b=cLG4j9hAUyaf7GxOXyl+OdfpjuvyH8Ss0mdHPqoq/sMrZz3WnhKWdQlfYM/Cz70csgWVvFOKPNTZLFqZb/YKz9KBHkqtJ+OM8ONNfXzTZSHKqxJCv42XvKqtH9zsCOPBl/zYOcPT0/Gx9bVl5YbivwpE/pyLCLFN6d3nf9uBFqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784673905; c=relaxed/simple; bh=F6eg8m0XfEeAQVIEMog3Tlm1NFa/9wzzvoIW3mfqbuw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PFBft8AvYIfdaJy2XH5oLsY9Kgua8HHfbdG6v66/FnSrTSypxRzG482P8JUjqxNykbu4PGc8/lyAIdiAgnYOfc4Tg8VN2G3HoNlHySsGXdM66gI/Y2+w+mdX2OFkwvOdbu1WDKzqjKlAGbRbDbakOfQNWJMRkDvZuzhRgfvwfqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=G2dokWMu; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="G2dokWMu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6367A1F000E9; Tue, 21 Jul 2026 22:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784673903; bh=QMDZVkqsNf4AxG9rwqxVjfIa97+VYkk9afvMgmWh3lw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=G2dokWMuaNBgVmekB+qp7tVYvzrlJRqTkscnRLTOi7QXmEfNAHoYgXicGRf+NHKMe 7GK9FsOUYQgiIDjg4vQHwRh5J9x+SrXZw+mWAJdCINz43RyWnJ4HR576/ANEM8U9rO P81wtmQuq/Wp+rxTaEIAtifTKtL0Z/6yoyuP6jE4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aleksey Makarov , Ratheesh Kannoth , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 339/699] octeontx2-pf: Fix leak of SQ timestamp buffer on teardown Date: Tue, 21 Jul 2026 17:21:38 +0200 Message-ID: <20260721152403.340781668@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152355.667394603@linuxfoundation.org> References: <20260721152355.667394603@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ratheesh Kannoth [ Upstream commit a056db30de92945ff8ee6033096678bfbae878e3 ] The send-queue timestamp ring is allocated with qmem_alloc() when timestamping is used, but otx2_free_sq_res() never freed sq->timestamps, leaking that memory across ifdown and device removal. Add the missing qmem_free() alongside the other SQ companion buffers. Fixes: c9c12d339d93 ("octeontx2-pf: Add support for PTP clock") Cc: Aleksey Makarov Signed-off-by: Ratheesh Kannoth Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260615030704.504536-1-rkannoth@marvell.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index 1516f248377549..50a36639e0ced6 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -1282,6 +1282,7 @@ static void otx2_free_sq_res(struct otx2_nic *pf) sq = &qset->sq[qidx]; qmem_free(pf->dev, sq->sqe); qmem_free(pf->dev, sq->tso_hdrs); + qmem_free(pf->dev, sq->timestamps); kfree(sq->sg); kfree(sq->sqb_ptrs); } -- 2.53.0