All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Ethan Tidmore <ethantidmore06@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	 linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Hans Verkuil <hverkuil+cisco@kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	 Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>,
	Kees Cook <kees@kernel.org>, Chen Ni <nichen@iscas.ac.cn>
Subject: Re: [PATCH] media: subdev: Fix error pointer dereference
Date: Mon, 16 Mar 2026 08:33:33 +0100	[thread overview]
Message-ID: <abex6C3WpLYDRDP5@zed> (raw)
In-Reply-To: <DH2693U3WV7A.3HE6S9RPAFP4E@gmail.com>

Hi Ethan

On Fri, Mar 13, 2026 at 10:06:43PM -0500, Ethan Tidmore wrote:
> On Fri Mar 13, 2026 at 10:02 PM CDT, Ethan Tidmore wrote:
> > The function media_pad_remote_pad_unique() returns an error pointer upon
> > failure, not null.
> >

A patch has already been submitted to fix this issue
https://patchwork.linuxtv.org/project/linux-media/patch/20260313063946.3220962-1-nichen@iscas.ac.cn/

> > Add check for error pointer and extract the error code with PTR_ERR().
>
> Detected by Smatch:
> drivers/media/v4l2-core/v4l2-subdev.c:2588 v4l2_subdev_get_frame_desc_passthrough() warn:
> 'remote_source_pad' is an error pointer or valid
>
> drivers/media/v4l2-core/v4l2-subdev.c:2595 v4l2_subdev_get_frame_desc_passthrough() error:
> 'remote_source_pad' dereferencing possible ERR_PTR()
>

Chen Ni: have you used Smatch as well ? Should you add the above lines
to attribute the bug report to it ?

Thanks
  j

> >
> > Fixes: a564839e630c1 ("media: subdev: Add v4l2_subdev_get_frame_desc_passthrough helper")
> > Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
> > ---
>
> Forgot to add the Smatch warnings, if this version is good please add
> this to the commit message.
>
> Thanks,
>
> ET

      reply	other threads:[~2026-03-16  7:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14  3:02 [PATCH] media: subdev: Fix error pointer dereference Ethan Tidmore
2026-03-14  3:06 ` Ethan Tidmore
2026-03-16  7:33   ` Jacopo Mondi [this message]

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=abex6C3WpLYDRDP5@zed \
    --to=jacopo.mondi@ideasonboard.com \
    --cc=ethantidmore06@gmail.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=kees@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen+renesas@ideasonboard.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.