dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pan Chuang" <panchuang@vivo.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/7] fbdev: omapfb/dsi-cm: Remove redundant dev_err()
Date: Wed, 22 Jul 2026 08:08:17 +0000	[thread overview]
Message-ID: <20260722080818.5906B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260722075803.570532-3-panchuang@vivo.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The error paths in `dsicm_probe()` fail to unregister the DSS device, leaving it linked in the global `panel_list` while its memory is freed, leading to a critical Use-After-Free.
--

--- Patch [2]: [PATCH 2/7] fbdev: omapfb/dsi-cm: Remove redundant dev_err() ---
commit 02fb3b045764b81b12936790330528bf51db067e
Author: Pan Chuang <panchuang@vivo.com>

fbdev: omapfb/dsi-cm: Remove redundant dev_err()

This commit removes a redundant dev_err() call after devm_request_irq()
since the devm API automatically logs detailed error messages on failure.

> diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
> index 5e7963b4aa93c..7c3463ee02ef1 100644
> --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
> +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
[ ... ]
> @@ -1185,10 +1185,8 @@ static int dsicm_probe(struct platform_device *pdev)
>  				IRQF_TRIGGER_RISING,
>  				"taal vsync", ddata);
>  
> -		if (r) {
> -			dev_err(dev, "IRQ request failed\n");
> +		if (r)
>  			return r;

[Severity: High]
This is a pre-existing issue, but does returning directly here leave a
dangling pointer in the global panel_list?

Earlier in dsicm_probe(), the display is registered and added to the
global list:

	r = omapdss_register_display(dssdev);
	if (r) {
		dev_err(dev, "Failed to register panel\n");
		goto err_reg;
	}

If devm_request_irq() fails here, the function returns directly without
calling omapdss_unregister_display().

Since ddata was allocated using devm_kzalloc(), it will be automatically
freed on probe failure. Could this cause memory corruption or a
use-after-free when other functions like omap_dss_get_next_device() iterate
over the panel_list?

> -		}
>  
>  		INIT_DEFERRABLE_WORK(&ddata->te_timeout_work,
>  					dsicm_te_timeout_work_callback);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260722075803.570532-1-panchuang@vivo.com?part=2

  reply	other threads:[~2026-07-22  8:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  7:57 [PATCH 0/7] video: fbdev: Remove redundant dev_err() Pan Chuang
2026-07-22  7:57 ` [PATCH 1/7] fbdev: mmp: " Pan Chuang
2026-07-22  8:07   ` sashiko-bot
2026-07-22  7:57 ` [PATCH 2/7] fbdev: omapfb/dsi-cm: " Pan Chuang
2026-07-22  8:08   ` sashiko-bot [this message]
2026-07-22  7:57 ` [PATCH 3/7] fbdev: pxa168fb: " Pan Chuang
2026-07-22  8:06   ` sashiko-bot
2026-07-22  7:57 ` [PATCH 4/7] fbdev: pxa3xx-gcu: " Pan Chuang
2026-07-22  8:07   ` sashiko-bot
2026-07-22  7:57 ` [PATCH 5/7] fbdev: pxafb: " Pan Chuang
2026-07-22  8:14   ` sashiko-bot
2026-07-22  7:57 ` [PATCH 6/7] fbdev: s3c-fb: " Pan Chuang
2026-07-22  8:20   ` sashiko-bot
2026-07-22  7:57 ` [PATCH 7/7] fbdev: sa1100fb: " Pan Chuang
2026-07-22  8:15   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260722080818.5906B1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=panchuang@vivo.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox