lkml.org 
[lkml]   [2019]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: media: staging/imx: Improve pipeline searching (bug report)
From
Date
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

\
 
 \ /
  Last update: 2019-06-26 20:36    [W:0.116 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site