Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2222739/?format=api
{ "id": 2222739, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222739/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260413141526.2961841-1-lgs201920130244@gmail.com/", "project": { "id": 21, "url": "http://patchwork.ozlabs.org/api/1.2/projects/21/?format=api", "name": "Linux Tegra Development", "link_name": "linux-tegra", "list_id": "linux-tegra.vger.kernel.org", "list_email": "linux-tegra@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260413141526.2961841-1-lgs201920130244@gmail.com>", "list_archive_url": null, "date": "2026-04-13T14:15:26", "name": "[v3] gpu: host1x: Fix device reference leak in host1x_device_parse_dt() error path", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "3fff0e6c0e95c542f3f11ce6d802d2fc9b5eeead", "submitter": { "id": 91722, "url": "http://patchwork.ozlabs.org/api/1.2/people/91722/?format=api", "name": "Guangshuo Li", "email": "lgs201920130244@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260413141526.2961841-1-lgs201920130244@gmail.com/mbox/", "series": [ { "id": 499714, "url": "http://patchwork.ozlabs.org/api/1.2/series/499714/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=499714", "date": "2026-04-13T14:15:26", "name": "[v3] gpu: host1x: Fix device reference leak in host1x_device_parse_dt() error path", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/499714/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222739/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222739/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-tegra+bounces-13748-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-tegra@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=fpE4uFcS;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13748-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"fpE4uFcS\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.171", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvV4P46fGz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 00:23:01 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id DBE433059598\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 14:16:04 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id BE3493D8116;\n\tMon, 13 Apr 2026 14:16:04 +0000 (UTC)", "from mail-pf1-f171.google.com (mail-pf1-f171.google.com\n [209.85.210.171])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 798E13CB2F1\n\tfor <linux-tegra@vger.kernel.org>; Mon, 13 Apr 2026 14:16:03 +0000 (UTC)", "by mail-pf1-f171.google.com with SMTP id\n d2e1a72fcca58-824c9da9928so3120382b3a.3\n for <linux-tegra@vger.kernel.org>;\n Mon, 13 Apr 2026 07:16:03 -0700 (PDT)", "from lgs.. ([2409:893d:1188:142d:6c67:74e8:5200:1f39])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f0c4b17fcsm11396301b3a.33.2026.04.13.07.15.56\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 13 Apr 2026 07:16:02 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776089764; cv=none;\n b=dIsBJd+jiqy7hOk4fkVVMay+S1HUNvjVnlaV9ACVXV7qUtn86oshMzcbHZrz5GFSJcEV5oeeHP2Yzp4wBcLD6+ciRy7PFTnZ0WRkIJJna5tPsaylsI2tcjNzJYgSaDO28VNlRXwT7lPGAtUJ6dy7lFgQPne6zFP5bcMJumhX9UY=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776089764; c=relaxed/simple;\n\tbh=joQClY02gPxW9Rgcbp7cpGeoX2QQLsorYSTJB70FVCY=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=eAP4XfxvzAednXr4RPm06n9zIe0ihVVkZ+ZH/nDdVPWvsi4H5nNzGvD4bQfUdCwPcWmV1Vf/679QZAc3sKKHlIoflyJYSuV/2pOun/YSkeesNC+hV4eyCTgMBBWohw9l4U4zLcxKpo9gYzxNKJk3pIpDIGUwYUnsKwAopfgRr4s=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=fpE4uFcS; arc=none smtp.client-ip=209.85.210.171", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776089763; x=1776694563;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=e0zbRRSwXZ7Pwh3Wo3GiTsNe9+S5y60LaaG4gtv9gLI=;\n b=fpE4uFcSQ93uZqwt9purUfTlAbpVDNmiEnXLWomjMdpAtKiwmdEnPGKGIySxODYzkT\n 1Z4t77ZKgTQzVXtnHRltKGDIvI+tN5bF3ZKaVbFxAhUAk1P+xJB7wQDC8vUdpf4gGufQ\n q8V/kVCO3U5VuDXh2r1Z57iGrJfNH+NvBTCRbbdOJeq9uScF8oF+q4DrqRbNLY0bBtXt\n I56XHKbj8lnJqPCTbYaYngSDu3sWW1U8IPmgdcFI299x/F9I0qSCEALcVUEHBgmHfKeX\n smJZ2xAyA19R16/wf7zkyPjJn4L/Z4ohuN863Z88SGkLY5z7JRspXc3Xjz7O9iWdQZeq\n ma7Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776089763; x=1776694563;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=e0zbRRSwXZ7Pwh3Wo3GiTsNe9+S5y60LaaG4gtv9gLI=;\n b=K1sb/pEj4ONiFZGaXok/yuAwA8UWjbE9XHtHvbFbONJ3y6671x76sGMDizra7TidYQ\n Jxf/zP7jYC277V/1DcLUJmuFkzAZSNZ5xRQb47ERdBerdpNSlBsR9sQCY7mK2fHk/fJK\n uhRpm11hXHgrCoDfXQ3/va+ojgJDOhbm0QscKVJngBoCFgs1l1HPw3HyQXDDeGJj/7m4\n cSR4EfhRX4spSn4VLIinPyPCRJTcZrjeojc2T5ZLsq7j6OVsxMeiUSVtyCJGHCWhgcVe\n +7iVCJhnp2q5Ef24S7dy5n5HmJCRGKPBj3JGY3LwVv7w2/6+KxvUO6aWXEzNVEGgDitu\n 4WBQ==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ88RTw6PteNSl5gQ9wDjRcE+0dPnMFJhl0dOo7k+1YWpRm2KA55vy1X1mcPgtbKHMzfLcH/u48K04nzOA==@vger.kernel.org", "X-Gm-Message-State": "AOJu0YxZuGNvK2806qlz/dKVkHPLC/pLfB+x48nxyu+m0X1gT49PmDGE\n\tUtpUSfyGupTf7krqyHD8xyV8JYiS/fOymLM8yy68fuOmJuj44WeDSWXZ", "X-Gm-Gg": "AeBDieswB56j0Cb+NKQv8RRMd9vk4kQM9Szzi2lWP7k+qK1Ilkjv+o8PCu8DdGz6C/h\n\tbhWdX7N4zSC+sGi5WIQrC+2jEEa4pO+0a6tcDauRr/MDGtbQc4bR6hHwsKTeeO0AKlpeKouWas3\n\t8RfRL1uKnDtxWrprCXGkusHw5yhydicIeuKViZImuUi9PNXTFqW8qC+atvjq4tjYLKIiSJZwpAB\n\t3C5ipibhTMDdM+gq1cnLvigswq1HI93O79oGkJDvf+7pkAMvDgWtIojqQXdkc/ocVsadTKJWlt9\n\tjx1mknZUddqiIWA766lgd0idGGNSxyk3pfEUhfT1uUeag+DsOwG02NMgbPK4BpYChyOcPuhHfNU\n\tieW3kkjkcjDvtXc2wE2iCspSkREUzehO2Tn0DNH2Skm1aGvmwpYtTOaMiA+b4EPJs8EdwE/TOeO\n\tVgZtVAnnDGGAFNkOA4i7C0Pf4bJZFzjfg=", "X-Received": "by 2002:a05:6a00:170c:b0:82c:ddbb:7db3 with SMTP id\n d2e1a72fcca58-82f0c21d396mr13302565b3a.25.1776089762689;\n Mon, 13 Apr 2026 07:16:02 -0700 (PDT)", "From": "Guangshuo Li <lgs201920130244@gmail.com>", "To": "Thierry Reding <thierry.reding@gmail.com>,\n\tMikko Perttunen <mperttunen@nvidia.com>,\n\tDavid Airlie <airlied@gmail.com>,\n\tSimona Vetter <simona@ffwll.ch>,\n\tMark Zhang <markz@nvidia.com>,\n\tSean Paul <seanpaul@chromium.org>,\n\tdri-devel@lists.freedesktop.org,\n\tlinux-tegra@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org", "Cc": "Guangshuo Li <lgs201920130244@gmail.com>,\n\tstable@vger.kernel.org", "Subject": "[PATCH v3] gpu: host1x: Fix device reference leak in\n host1x_device_parse_dt() error path", "Date": "Mon, 13 Apr 2026 22:15:26 +0800", "Message-ID": "<20260413141526.2961841-1-lgs201920130244@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "Precedence": "bulk", "X-Mailing-List": "linux-tegra@vger.kernel.org", "List-Id": "<linux-tegra.vger.kernel.org>", "List-Subscribe": "<mailto:linux-tegra+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-tegra+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "After device_initialize(), the embedded struct device in struct\nhost1x_device should be released through the device core with\nput_device().\n\nIn host1x_device_add(), if host1x_device_parse_dt() fails, the current\nerror path frees the object directly with kfree(device). That bypasses\nthe normal device lifetime handling and leaks the reference held on the\nembedded struct device.\n\nThe issue was identified by a static analysis tool I developed and\nconfirmed by manual review.\n\nFix this by using put_device() in the host1x_device_parse_dt() failure\npath.\n\nFixes: f4c5cf88fbd50 (\"gpu: host1x: Provide a proper struct bus_type\")\nCc: stable@vger.kernel.org\nSigned-off-by: Guangshuo Li <lgs201920130244@gmail.com>\n---\nv3:\n - note that the issue was identified by my static analysis tool\n - and confirmed by manual review\n\nv2:\n - add Cc: stable@vger.kernel.org\n\n drivers/gpu/host1x/bus.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c\nindex 63fe037c3b65..e3ac85848aec 100644\n--- a/drivers/gpu/host1x/bus.c\n+++ b/drivers/gpu/host1x/bus.c\n@@ -452,7 +452,7 @@ static int host1x_device_add(struct host1x *host1x,\n \n \terr = host1x_device_parse_dt(device, driver);\n \tif (err < 0) {\n-\t\tkfree(device);\n+\t\tput_device(&device->dev);\n \t\treturn err;\n \t}\n \n", "prefixes": [ "v3" ] }