Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2223098/?format=api
{ "id": 2223098, "url": "http://patchwork.ozlabs.org/api/patches/2223098/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260414055013.2978223-1-gurumoorthy.santhakumar@oss.qualcomm.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260414055013.2978223-1-gurumoorthy.santhakumar@oss.qualcomm.com>", "list_archive_url": null, "date": "2026-04-14T05:50:13", "name": "[v1] usb: dwc3: core: fix memory leaks in event buffer cleanup", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e56b61b3ce3525b01e74e5f0681200d3632beab3", "submitter": { "id": 93144, "url": "http://patchwork.ozlabs.org/api/people/93144/?format=api", "name": "Gurumoorthy Santhakumar", "email": "gurumoorthy.santhakumar@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260414055013.2978223-1-gurumoorthy.santhakumar@oss.qualcomm.com/mbox/", "series": [ { "id": 499835, "url": "http://patchwork.ozlabs.org/api/series/499835/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=499835", "date": "2026-04-14T05:50:13", "name": "[v1] usb: dwc3: core: fix memory leaks in event buffer cleanup", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499835/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223098/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223098/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=n61Yo1BB;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=EViFBtFx;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=oss.qualcomm.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"n61Yo1BB\";\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"EViFBtFx\";\n\tdkim-atps=neutral", "phobos.denx.de; dmarc=none (p=none dis=none)\n header.from=oss.qualcomm.com", "phobos.denx.de; spf=pass\n smtp.mailfrom=gurumoorthy.santhakumar@oss.qualcomm.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fw44p14YSz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 22:55:22 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 117408422D;\n\tTue, 14 Apr 2026 14:54:53 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id A7C5383EC6; Tue, 14 Apr 2026 07:50:25 +0200 (CEST)", "from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 6A7D9838BB\n for <u-boot@lists.denx.de>; Tue, 14 Apr 2026 07:50:23 +0200 (CEST)", "from pps.filterd (m0279868.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63DLCRtS280759\n for <u-boot@lists.denx.de>; Tue, 14 Apr 2026 05:50:22 GMT", "from mail-pg1-f198.google.com (mail-pg1-f198.google.com\n [209.85.215.198])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dh86vh779-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <u-boot@lists.denx.de>; Tue, 14 Apr 2026 05:50:21 +0000 (GMT)", "by mail-pg1-f198.google.com with SMTP id\n 41be03b00d2f7-c7948640854so396813a12.1\n for <u-boot@lists.denx.de>; Mon, 13 Apr 2026 22:50:21 -0700 (PDT)", "from hu-gsanthak-blr.qualcomm.com\n (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19])\n by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c79216fff97sm12312303a12.7.2026.04.13.22.50.17\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 13 Apr 2026 22:50:19 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=qcppdkim1; bh=Kej3fKCruf1qbsToMzFLSVf/N4OI3SGhYX8\n YCfZWtZU=; b=n61Yo1BBBxil2+UnTutbUy/XHU0ckZkOYb5cPszgRH8BC24Qgt4\n 3w5sIUqVhcslDR3jPvogjl+9VXPKg2JTr/aUIODc6/t8TPg5MWEZkxFHE4Bl7nk+\n lU4/3IyLcou+/Jw1Igxt6098pz3h24binX147G/b5WfCJs5KarGhnKlAX9Sy9moJ\n P3QqAmZEkrmxJVhIcmey8PDpQ3uow0dxb+tkww9ravOK8pBhgQulTIklooN4YjsG\n 7pocdB1nTG2u/DSocPo8Mba8eIdgHyeYl00W9Gdm/tiEdHUNNlYfjGWjDwmBBD8m\n YgjDXf3xF9IJyX2LOHbQnOUz4ufPI6j25+g==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1776145821; x=1776750621; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=Kej3fKCruf1qbsToMzFLSVf/N4OI3SGhYX8YCfZWtZU=;\n b=EViFBtFxwAXnfetNnm9rTEZ+jIXJorl7tfbusjfMWorBi54zRyaFWh+et/fPGJ+W9W\n OEJwHDD23gp2na037BePxoO9GrBE8MUVw31sz8aY8nCWaY73BlWiGw8ovHIAho3sKen7\n /fLk31MGh5/aseWidoahif5Mh2GUjID84N4m+rk8vs8jn5kVOmv1lSEa/M5aQu0SPQ//\n W35t1fNe4YLwSjtwgjlRrejfHhRTsf/Jc2lX2cn0LjRGYCGwS/fAEs8ibvqqHAXU9ZdH\n p+j06JrPtDCrCtKlaNmXQbkQOOHctXzHdlK5RJgKrWZMrmMBPpAj64Sz/0IvVt4dYGGW\n PnYA==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776145821; x=1776750621;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=Kej3fKCruf1qbsToMzFLSVf/N4OI3SGhYX8YCfZWtZU=;\n b=sx5Vb7HH1Yi1yidkCibnDC2OM8hZdA6jvGe2lGDErbDh4uRA4DIRKosUuX9G88SHvh\n +cyn+Or1J11SYwwajruMYcfjDMUSpfTjQe8pVK6bjGAFCtWIJroK/V27ZgKYVXxkCBnz\n pcFZ/VxUvT+5PvVSrRzRqGeC/XAK1MbZqGFk4zuDLaavcLMRfTSXVbUTzze2gFhNaeFP\n PisSLpcNf2LXlbqsV+wyzY+W6SXv9tgvH8+kZQIs+6xem4K1BCvazjkwfCXxUgLaguSF\n 1mgngHemzVs3L/BvIfxtlnAK5xvZbiQ1yvSnwJmULqAohog2/faU4eUjPV57ZPQo97Vf\n M5Ag==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ+/AQaw3o2t+8RFaO+GSBTR71S8EsSbcAtmUJUdw6LS2cgeZ5NaypajmxHMnni0vHr469J2b1M=@lists.denx.de", "X-Gm-Message-State": "AOJu0Yx/DKgzAnxCxcH5X3I+9kSUOworOVx8fV2aTUXw5WoOdOYBAzEw\n qTwuBZqBAndz6LftqSH5fkDfulU2ENZfN31TXHbZXo/f9lDKx0fD9GP077n4Rg5IbPiDjkKqm1K\n dmPoRZvFdwT9CP1zT43+o29GDdCdTikSf0R0ayY+Ft+5NB66Xrq1Lq+lc", "X-Gm-Gg": "AeBDieub55fh+zKXZPMWc/7eaGCdZeY6NbGHBZNU5/V+U+p0wPYjZG+c2UDdJpZGHs7\n ARRNTGqXNw0MHFAcSpm8AEs9srdlCN89srr8LjbT5S7r3/1VAujSrWsCa8bztQYHFb9ZyEdFpTb\n UH1gHCge6c7hxZQJDLMmG3d0EI/ToAJqPlw2I6IYRoi6RZr8kl52I6ho2qetrX22pZaNYhCEoro\n Zo+/Vjl1+cvld45nQa+/2GAF72sUuJ0XCQDX623oKWW7+7Hgvq9FNXu89nSZ5TDj3SGlC6DrEc/\n vrP7LcSVpYViMbgNrBaRAITYulxD6FNw6za110bQcU2pWr8hmWSh/pSbuzkHX2aFHJLrIURrv5w\n iHGtjpOBRFQ8Ad+nEYC+scnXfZHTXwtj5lMdwVINydofjzMh+ioua8xzqSDkGaNxe2VXH0T8QaF\n DhSTRquhZnkBN/Xlji0CoZxwsqkDVGEK9Pze8AUOcG6gVQBy/FEXi3/BB7Mpyhj+7wNsc=", "X-Received": [ "by 2002:a05:6a20:6a1d:b0:39c:3de:efec with SMTP id\n adf61e73a8af0-39fe3ca18fbmr19435326637.14.1776145820864;\n Mon, 13 Apr 2026 22:50:20 -0700 (PDT)", "by 2002:a05:6a20:6a1d:b0:39c:3de:efec with SMTP id\n adf61e73a8af0-39fe3ca18fbmr19435297637.14.1776145820384;\n Mon, 13 Apr 2026 22:50:20 -0700 (PDT)" ], "From": "Gurumoorthy Santhakumar <gurumoorthy.santhakumar@oss.qualcomm.com>", "To": "marex@denx.de, trini@konsulko.com, mkorpershoek@kernel.org,\n macromorgan@hotmail.com, casey.connolly@linaro.org,\n gurumoorthy.santhakumar@oss.qualcomm.com, felipe.balbi@linux.intel.com,\n quic_varada@quicinc.com, u-boot@lists.denx.de", "Subject": "[PATCH v1] usb: dwc3: core: fix memory leaks in event buffer cleanup", "Date": "Tue, 14 Apr 2026 11:20:13 +0530", "Message-Id": "\n <20260414055013.2978223-1-gurumoorthy.santhakumar@oss.qualcomm.com>", "X-Mailer": "git-send-email 2.34.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Proofpoint-GUID": "NPqTg3lW0gOAT14pk6e6YwGr3KMkDP6H", "X-Authority-Analysis": "v=2.4 cv=cffiaHDM c=1 sm=1 tr=0 ts=69ddd59d cx=c_pps\n a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8\n a=8ukGJnHcqfySqs3Rp24A:9 a=x9snwWr2DeNwDh03kgHS:22", "X-Proofpoint-ORIG-GUID": "NPqTg3lW0gOAT14pk6e6YwGr3KMkDP6H", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDE0MDA1MyBTYWx0ZWRfX9HY/yqeHFs0U\n FJqqghZCFXSsa0v87mpaz4dkyck3VNUgJN20OBGWR6tk3KiWhQW4Dagdmhm8BLjhpMlqeDIKNym\n /UTd5IxGHCodH51QezQ/h0NLsRY9H0Gt//wS3UE2kbqipq02IazIFczjQYC+MCC2OO0s+fcW5Yd\n xVPZq7kyb9qUuqsTiqaUPsmQJjCOaA0ubgB1JlVh+QVAjdiNSq5QyDDxuIxUtlVWqGz7OzugJmA\n 5AjWhbRZgsWGf18JOjNbGIhAysvWVYf8Pso7M35vgNcW8a9ynysgFYWzIcft+wnx4vZJ1gw3Enh\n Z8pn0vLzNge8/XQZX7hyzzsoo06NpZTnXlDq7fhkd3Hd6gRZ4u8cI55q/T4EUehvF6RZgN3ZEkV\n AsgyTfY2SRYjx7BlFbodyNunv9uTRgUDnzGWSwuANr0JPfbDC4H3Fo2jpss2sSvTJmPnm7960XS\n ETbWn8Zh+EXfrsLDErQ==", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-14_01,2026-04-13_04,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 bulkscore=0\n clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 phishscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604140053", "X-Mailman-Approved-At": "Tue, 14 Apr 2026 14:54:51 +0200", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "In dwc3_free_one_event_buffer(), only the DMA buffer (evt->buf) was\nbeing freed via dma_free_coherent(), but the evt structure itself was\nnever explicitly freed, causing a memory leak.\n\nIn dwc3_free_event_buffers(), the ev_buffs pointer array allocated\nwith memalign() was never freed after iterating and releasing all\nindividual event buffers, causing another memory leak.\n\nFix both leaks by freeing the evt struct in\ndwc3_free_one_event_buffer() and freeing dwc->ev_buffs in\ndwc3_free_event_buffers() after all entries have been released.\n\nSigned-off-by: Gurumoorthy Santhakumar <gurumoorthy.santhakumar@oss.qualcomm.com>\n---\n drivers/usb/dwc3/core.c | 10 ++++++++++\n 1 file changed, 10 insertions(+)", "diff": "diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c\nindex 6f22b9232ba..e0c4cb64c48 100644\n--- a/drivers/usb/dwc3/core.c\n+++ b/drivers/usb/dwc3/core.c\n@@ -206,6 +206,11 @@ static void dwc3_free_one_event_buffer(struct dwc3 *dwc,\n \t\tstruct dwc3_event_buffer *evt)\n {\n \tdma_free_coherent(evt->buf);\n+\n+\tif (evt) {\n+\t\tfree(evt);\n+\t\tevt = NULL;\n+\t}\n }\n \n /**\n@@ -252,6 +257,11 @@ static void dwc3_free_event_buffers(struct dwc3 *dwc)\n \t\tif (evt)\n \t\t\tdwc3_free_one_event_buffer(dwc, evt);\n \t}\n+\n+\tif (dwc->ev_buffs) {\n+\t\tfree(dwc->ev_buffs);\n+\t\tdwc->ev_buffs = NULL;\n+\t}\n }\n \n /**\n", "prefixes": [ "v1" ] }