Re: [PATCH 2/2] media: v4l: vsp1: Fix uif null pointer access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans,

On Tue, Mar 16, 2021 at 09:21:15AM +0100, Hans Verkuil wrote:
> On 15/03/2021 04:42, Laurent Pinchart wrote:
> > On Wed, Mar 10, 2021 at 02:50:23PM +0000, Biju Das wrote:
> >>> On 10/03/2021 13:56, Biju Das wrote:
> >>>> Thanks for the feedback.
> >>>>> Subject: Re: [PATCH 2/2] media: v4l: vsp1: Fix uif null pointer
> >>>>> access
> >>>>>
> >>>>> Hi Biju,
> >>>>>
> >>>>> On 01/03/2021 12:08, Biju Das wrote:
> >>>>>> RZ/G2L SoC has no UIF. This patch fixes null pointer access, when
> >>>>>> UIF module is not used.
> >>>>>>
> >>>>>> Fixes: 5e824f989e6e8("media: v4l: vsp1: Integrate DISCOM in display
> >>>>>> pipeline")
> >>>>>> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> >>>>>> ---
> >>>>>>  drivers/media/platform/vsp1/vsp1_drm.c | 4 ++--
> >>>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>>>>>
> >>>>>> diff --git a/drivers/media/platform/vsp1/vsp1_drm.c
> >>>>>> b/drivers/media/platform/vsp1/vsp1_drm.c
> >>>>>> index f6d2f47a4058..06f74d410973 100644
> >>>>>> --- a/drivers/media/platform/vsp1/vsp1_drm.c
> >>>>>> +++ b/drivers/media/platform/vsp1/vsp1_drm.c
> >>>>>> @@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs(struct
> >>>>>> vsp1_device *vsp1,
> >>>>>
> >>>>>
> >>>>> This looks like it complicates these conditionals more than we
> >>>>> perhaps need to.
> >>>>>
> >>>>> What do you think about adding something above the block comment here?:
> >>>>
> >>>> It is much better.
> >>>>
> >>>> This patch is accepted in media tree[1]. So not sure, should I send a
> >>>> follow up patch as optimization or drop this patch and send new one.
> >>>
> >>> Oh, I didn't realise these were in already. Sorry, I didn't see any review
> >>> on the list, and it was the earliest I had got to them.
> >>>
> >>>> Please suggest.
> >>>
> >>> Up to you, I don't think this would get dropped now it's integrated.
> >>> It's in, so if you want to update on top I believe that's fine.
> >>
> >> OK, Will send follow up patch as optimization.
> > 
> > That would be nice.
> > 
> > I don't think this patch should have been fast-tracked as a fix, as
> > RZ/G2L isn't supported in mainline yet as far as I can tell.
> > 
> > Hans, next time, could we get a notification instead of a silent merge ?
> 
> My apologies, it seemed a trivial fix, but I should have checked with you.
> 
> I jumped the gun here :-(

No worries, it can happen :-)

> >>>>> 	if (!drm_pipe->uif)
> >>>>> 		return 0;
> >>>>>
> >>>>>
> >>>>>>  	 * make sure it is present in the pipeline's list of entities if it
> >>>>>>  	 * wasn't already.
> >>>>>>  	 */
> >>>>>> -	if (!use_uif) {
> >>>>>> +	if (drm_pipe->uif && !use_uif) {
> >>>>>>  		drm_pipe->uif->pipe = NULL;
> >>>>>> -	} else if (!drm_pipe->uif->pipe) {
> >>>>>> +	} else if (drm_pipe->uif && !drm_pipe->uif->pipe) {>
> >>>>> 	drm_pipe->uif->pipe = pipe;
> >>>>>>  		list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
> >>>>>>  	}
> >>>>>>

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux