mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: Colin Ian King <colin.king@canonical.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Rui Miguel Silva <rmfrfs@gmail.com>,
	linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-arm-kernel@lists.infradead.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: media: staging/imx: Improve pipeline searching (bug report)
Date: Wed, 26 Jun 2019 11:35:38 -0700	[thread overview]
Message-ID: <fa12f7f7-c2c8-6777-0359-8bdd8290f517@gmail.com> (raw)
In-Reply-To: <9b6d7f0e-f191-e5d5-e20b-9244800678fe@canonical.com>

Thanks for catching,

On 6/26/19 11:27 AM, Colin Ian King wrote:
> Hi,
>
> Static analysis with Coverity on Linux next has found a potential issue
> with the following commit:
>
> commit 3ef46bc97ca2c918b7657a08220c7340a9bb07a2
> Author: Steve Longerbeam <slongerbeam@gmail.com>
> Date:   Fri May 10 17:50:11 2019 -0400
>
>      media: staging/imx: Improve pipeline searching
>
>
> The issue is in drivers/staging/media/imx/imx-media-utils.c in function
> find_pipeline_entity:
>
>          struct media_pad *pad = NULL;
>
> pad is assigned a NULL
>
>          struct video_device *vfd;
>          struct v4l2_subdev *sd;
>
>          if (grp_id && is_media_entity_v4l2_subdev(start)) {
>                  sd = media_entity_to_v4l2_subdev(start);
>                  if (sd->grp_id & grp_id)
>                          return &sd->entity;
>          } else if (buftype && is_media_entity_v4l2_video_device(start)) {
>                  vfd = media_entity_to_video_device(pad->entity);
>
> ..and above the null pad is being dereferenced causing a kernel oops.

yes, this is a typo and should be:

vfd = media_entity_to_video_device(start);


Sending a patch...

Steve


      reply	other threads:[~2019-06-26 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 18:27 Colin Ian King
2019-06-26 18:35 ` Steve Longerbeam [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=fa12f7f7-c2c8-6777-0359-8bdd8290f517@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=rmfrfs@gmail.com \
    --cc=shawnguo@kernel.org \
    /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

all inboxes | Powered by JetHome®