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 EF3EB471257; Tue, 21 Jul 2026 19:39:39 +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=1784662781; cv=none; b=VmhTDoRw8JKVXL5mB8F9NjHwg+HZNUx0Sp5S6geIFQVCTENpDpy1W3htrQbqkED8hTXAL4rEhFPUuSS6eGGqbFKL7TemQ3mfyTxp6aziMIze6i7khWQSTZKu7ld6nH4WDP0xzhOP6URzdCufDuPrKurPh3DYHnpG3i163cSIEZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662781; c=relaxed/simple; bh=oVz24K/RAKWYeCJO396zumHm4OsXuIgQczd0taN6p3E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TN/d3AcRaIJGRm6rXnI6uzfmbZVkVtuBoVL+DmcLLgDGn29UBdpt4mYbT27JYITQCPMzO/55FYE6UrcIrweoRKWYLEZog3W+vAMzfiLSdKxicJCg88gFkNWFtQG4lSVdHkdIAU7UoW1ewVZBr+0eWO48hDpj95G28bOPjr0vdAQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JVsSXu7V; 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="JVsSXu7V" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FDDC1F000E9; Tue, 21 Jul 2026 19:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784662779; bh=2uaoYywlifp6c8XvuM0d6iRDdoR/j2MMUzPrnj6E9Bc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JVsSXu7V2v2m3pJnrfmMUJyLDr/D09zWxeHEFhqm0PwWBS3MhbXlqGHLtuRAPwKNK qEiVZVLJ+Txj7RIY6gxa41Gusn4DjPbslS2sQA3B2aqah8EiVKZ0sLRnshgvl/MYbo 46IsdHZ2rsUxABT7WMLxfCiK0KZdIIZ2cNIlCUZk= 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 6.12 0574/1276] octeontx2-pf: Fix leak of SQ timestamp buffer on teardown Date: Tue, 21 Jul 2026 17:16:57 +0200 Message-ID: <20260721152458.960773516@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@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 6.12-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 ce01fab28624f2..dc4909149fdb85 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -1444,6 +1444,7 @@ static void otx2_free_sq_res(struct otx2_nic *pf) continue; 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