From: Maximilian Luz <luzmaximilian@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: bingbu.cao@intel.com, linux-media@vger.kernel.org,
tian.shu.qiu@intel.com, tomi.valkeinen@ideasonboard.com,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH 1/1] ipu3-imgu: Fix NULL pointer dereference in active selection access
Date: Wed, 7 Sep 2022 23:26:47 +0200 [thread overview]
Message-ID: <556b36fb-9255-daa4-0cda-bb3bb7f53b8e@gmail.com> (raw)
In-Reply-To: <Yxj4jmCQ4zvKN3sp@paasikivi.fi.intel.com>
On 9/7/22 22:01, Sakari Ailus wrote:
> Hi Maximilian,
>
> On Wed, Sep 07, 2022 at 03:44:44PM +0200, Maximilian Luz wrote:
>> Hi,
>>
>> On Thu, 25 Aug 2022 22:03:51 +0300, Sakari Ailus wrote:
>>> What the IMGU driver did was that it first acquired the pointers to active
>>> and try V4L2 subdev state, and only then figured out which one to use.
>>>
>>> The problem with that approach and a later patch (see Fixes: tag) is that
>>> as sd_state argument to v4l2_subdev_get_try_crop() et al is NULL, there is
>>> now an attempt to dereference that.
>>>
>>> Fix this.
>>
>> Thank you for this fix, this however only addresses
>> imgu_subdev_get_selection(), but the issue is also present in
>> imgu_subdev_set_selection(). I assume that a similar fix is needed for that.
>> I've added a diff for that below. Feel free to squash that into your patch or
>> let me know if I should submit this separately.
>
> I've already sent a PR that includes it. Could you send this one as a
> patch, please?
Sure, I'll do that. I'll also follow Laurent's suggestions and introduce
get_crop()/get_compose() helpers as I think that might be a bit cleaner.
Regards,
Max
prev parent reply other threads:[~2022-09-07 21:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 19:03 [PATCH 1/1] ipu3-imgu: Fix NULL pointer dereference in active selection access Sakari Ailus
2022-08-26 10:40 ` Bingbu Cao
2022-09-07 13:44 ` Maximilian Luz
2022-09-07 19:09 ` Laurent Pinchart
2022-09-07 21:29 ` Maximilian Luz
2022-09-07 20:01 ` Sakari Ailus
2022-09-07 21:26 ` Maximilian Luz [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=556b36fb-9255-daa4-0cda-bb3bb7f53b8e@gmail.com \
--to=luzmaximilian@gmail.com \
--cc=bingbu.cao@intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=tomi.valkeinen@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox