Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2222480/?format=api
{ "id": 2222480, "url": "http://patchwork.ozlabs.org/api/patches/2222480/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260412084808.232010-1-hossu.alexandru@gmail.com/", "project": { "id": 21, "url": "http://patchwork.ozlabs.org/api/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": "<20260412084808.232010-1-hossu.alexandru@gmail.com>", "list_archive_url": null, "date": "2026-04-12T08:48:08", "name": "[2/2] staging: media: tegra-video: add missing error checks in vi_tpg_fmts_bitmap_init()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6c764e24f79a06794354607e4322cbd9f4e3725a", "submitter": { "id": 92777, "url": "http://patchwork.ozlabs.org/api/people/92777/?format=api", "name": "Alexandru Hossu", "email": "hossu.alexandru@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260412084808.232010-1-hossu.alexandru@gmail.com/mbox/", "series": [ { "id": 499589, "url": "http://patchwork.ozlabs.org/api/series/499589/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=499589", "date": "2026-04-12T08:48:08", "name": null, "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499589/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222480/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222480/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-tegra+bounces-13714-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=iBxb5y51;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13714-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=\"iBxb5y51\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.208.50", "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 sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::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 4ftkkq2wqjz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 18:50:11 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id D7BA03001F87\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 08:49:39 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id BFA5C30FF08;\n\tSun, 12 Apr 2026 08:49:38 +0000 (UTC)", "from mail-ed1-f50.google.com (mail-ed1-f50.google.com\n [209.85.208.50])\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 2CA692FFF8D\n\tfor <linux-tegra@vger.kernel.org>; Sun, 12 Apr 2026 08:49:37 +0000 (UTC)", "by mail-ed1-f50.google.com with SMTP id\n 4fb4d7f45d1cf-6714f678bdaso382215a12.3\n for <linux-tegra@vger.kernel.org>;\n Sun, 12 Apr 2026 01:49:36 -0700 (PDT)", "from ahossu.residents.sin.openfiber.nl ([88.202.160.248])\n by smtp.gmail.com with ESMTPSA id\n a640c23a62f3a-b9d6dfd89a9sm226253366b.25.2026.04.12.01.49.33\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 12 Apr 2026 01:49:34 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775983778; cv=none;\n b=YaaVP0l5Cc5XV1ObhOr0S0p+Ut/IT596zCzOjJcQHLjx+HrOlfrkle9kETMy816qERftFsp/oT4mtdnVRnxx0ZHUhnHB9fuyfzFy5ly0LWdBQZx5ciweTztl6hSEfPPE4zlleW5tsaYUoqU6DsLLxyuq6R0/85+m8M3I57b3Hxc=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775983778; c=relaxed/simple;\n\tbh=Zh1gMWcDLON+NjfzXUS2eYcY2NU/RrfJ8BIhx6gE90w=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Tn1PMvNj1jCp6dsYnW4UFVQqOFbiV62VSFSj/aHOS2NZ2WijmbHm+FjFpiIoqpElNfhaMussQ+Gngdt61jyLQC0YxsCjlJJAqZNg3jRezfedd0QpI8UZRUwMR5ZvWrmyd9+94a0qq8ZbLqvAoSMY7P00si+Zflhirs0v0WLQO0Q=", "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=iBxb5y51; arc=none smtp.client-ip=209.85.208.50", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775983775; x=1776588575;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=U+KERGfJ0lgKno7VzsagW4vKndlmZyVJae2CPohMXXU=;\n b=iBxb5y51wrQK1NV3WgNsk50NxLIsFxZuC9xecAUt6PmH6MHEfTRDIUdfmo8P2zTo9k\n 1taWXM19afs8cuyi9nmsObviYpMz0mG1uiqaSdKVLa6SDB31R8nOr427MhPRR8yDgOik\n TyLI56tJLGBmcDR+NMwLOaEKTmVk7B2zhSKs2uFB8clO6ub49OCNsqIQGvjnU73W/jq6\n OZRhhgskzq/e1DbglsVby+/k+m522EyOXtuJgej0fQshxxdQqVAm7d4CAFCWCc0RZ51U\n 2RXT0a1Lopwl4ohyZH6lQP6t0PfnLV0N6aE/HEmPlbJ/nW07YJAEPfJMnDg89qir6WAU\n 5W2A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775983775; x=1776588575;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=U+KERGfJ0lgKno7VzsagW4vKndlmZyVJae2CPohMXXU=;\n b=VZbIA7wxiKLjhjyCG//1XqzB0NtP7FrqNihpzJGn/e+xZLtMof+KR6JKS+5QAWdKg3\n JXgO6987dxGtuzDgA0Kudkm3lonKM3lDX/lVvPdxhoTjA4MFE3rW3tweM7ud/fpeno2x\n fSHhh5eFBmHo7YEloVVG7iRTc6CIsT9yU66ttvyPgJixWCnPwKhrPe3zff9nH1WjZq3r\n zcmFLTypn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8 with SMTP id\n a640c23a62f3a-b9ddf7429e8mr7795766b.32.1775983775119;\n Sun, 12 Apr 2026 01:49:35 -0700 (PDT)", "From": "Alexandru Hossu <hossu.alexandru@gmail.com>", "To": "Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tThierry Reding <thierry.reding@gmail.com>,\n\tSowjanya Komatineni <skomatineni@nvidia.com>", "Cc": "Jonathan Hunter <jonathanh@nvidia.com>,\n\tLuca Ceresoli <luca.ceresoli@bootlin.com>,\n\tMauro Carvalho Chehab <mchehab@kernel.org>,\n\tlinux-media@vger.kernel.org,\n\tlinux-tegra@vger.kernel.org,\n\tlinux-staging@lists.linux.dev,\n\tlinux-kernel@vger.kernel.org,\n\tAlexandru Hossu <hossu.alexandru@gmail.com>", "Subject": "[PATCH 2/2] staging: media: tegra-video: add missing error checks in\n vi_tpg_fmts_bitmap_init()", "Date": "Sun, 12 Apr 2026 10:48:08 +0200", "Message-ID": "<20260412084808.232010-1-hossu.alexandru@gmail.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260412045245.GA2019381@kroah.com>", "References": "<20260412045245.GA2019381@kroah.com>", "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": "tegra_get_format_idx_by_code() returns -1 when the requested format is\nnot found in the SoC format table. vi_tpg_fmts_bitmap_init() does not\ncheck this return value before passing it to bitmap_set(). A negative\nindex converted to unsigned would result in an out-of-bounds memory\naccess, corrupting adjacent kernel memory.\n\nAdd WARN_ON() guards so that any future SoC addition or Kconfig change\nthat exposes this path fails loudly rather than silently corrupting memory.\n\nSigned-off-by: Alexandru Hossu <hossu.alexandru@gmail.com>\n---\n drivers/staging/media/tegra-video/vi.c | 16 ++++++++++++++--\n 1 file changed, 14 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c\nindex afc7327ef318..d1d934e361f7 100644\n--- a/drivers/staging/media/tegra-video/vi.c\n+++ b/drivers/staging/media/tegra-video/vi.c\n@@ -1017,7 +1017,7 @@ static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan)\n }\n \n /* VI only support 2 formats in TPG mode */\n-static void vi_tpg_fmts_bitmap_init(struct tegra_vi_channel *chan)\n+static int vi_tpg_fmts_bitmap_init(struct tegra_vi_channel *chan)\n {\n \tint index;\n \n@@ -1025,12 +1025,22 @@ static void vi_tpg_fmts_bitmap_init(struct tegra_vi_channel *chan)\n \n \tindex = tegra_get_format_idx_by_code(chan->vi,\n \t\t\t\t\t MEDIA_BUS_FMT_SRGGB10_1X10, 0);\n+\tif (index < 0) {\n+\t\tdev_err(chan->vi->dev, \"format SRGGB10_1X10 not found\\n\");\n+\t\treturn -EINVAL;\n+\t}\n \tbitmap_set(chan->tpg_fmts_bitmap, index, 1);\n \n \tindex = tegra_get_format_idx_by_code(chan->vi,\n \t\t\t\t\t MEDIA_BUS_FMT_RGB888_1X32_PADHI,\n \t\t\t\t\t 0);\n+\tif (index < 0) {\n+\t\tdev_err(chan->vi->dev, \"format RGB888_1X32_PADHI not found\\n\");\n+\t\treturn -EINVAL;\n+\t}\n \tbitmap_set(chan->tpg_fmts_bitmap, index, 1);\n+\n+\treturn 0;\n }\n \n static int vi_fmts_bitmap_init(struct tegra_vi_channel *chan)\n@@ -1410,7 +1420,9 @@ int tegra_v4l2_nodes_setup_tpg(struct tegra_video_device *vid)\n \t\t\tgoto cleanup;\n \n \t\tv4l2_set_subdev_hostdata(&csi_chan->subdev, vi_chan);\n-\t\tvi_tpg_fmts_bitmap_init(vi_chan);\n+\t\tret = vi_tpg_fmts_bitmap_init(vi_chan);\n+\t\tif (ret < 0)\n+\t\t\tgoto cleanup;\n \t\tcsi_chan = list_next_entry(csi_chan, list);\n \t}\n \n", "prefixes": [ "2/2" ] }