public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Kate Hsuan <hpa@redhat.com>
Subject: Re: [PATCH 1/1] media: v4l: subdev: Make link validation safer
Date: Fri, 3 Mar 2023 16:06:11 +0100	[thread overview]
Message-ID: <49f77774-b34b-130d-a761-9a087c1d4ea8@redhat.com> (raw)
In-Reply-To: <311809d5-8fd1-1514-dd7c-670cfda0c5b4@ideasonboard.com>

Hi,

On 3/3/23 12:36, Tomi Valkeinen wrote:
> On 03/03/2023 13:30, Sakari Ailus wrote:
>> Hi Tomi,
>>
>> On Fri, Mar 03, 2023 at 10:41:27AM +0200, Tomi Valkeinen wrote:
>>> On 02/03/2023 22:22, Sakari Ailus wrote:
>>>> Link validation currently accesses invalid pointers if the link passed to it
>>>> is not between two sub-devices. This is of course a driver bug.
>>>>
>>>> Ignore the error but print a debug message, as this is how it used to work
>>>> previously.
>>>>
>>>> Fixes: a6b995ed03ff ("media: subdev: use streams in v4l2_subdev_link_validate()")
>>>> Reported-by: Hans de Goede <hdegoede@redhat.com>
>>>> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>>>> ---
>>>> Hi Hans,
>>>>
>>>> Could you test this?
>>>>
>>>> The bug is of course in the ImgU driver and this reverts to the old
>>>> pre-streams behaviour. It silently fails instead of oopsing. The ImgU driver
>>>> needs to be fixed and I think we could make this return an error at the same
>>>> time. Right now I can't be sure the ImgU driver is the only one suffering
>>>> from this, but if so, it's likely to be broken anyway.
>>>
>>> Maybe it should be at least a warn? How do we catch other broken drivers
>>> otherwise?
>>
>> The purpose of this patch is just to restore the old behaviour, and merge
>> it as a fix to v6.3 (via Cc'ing stable). I agree this should be made an
>> error but I'd like that change to be present in the media tree for some
>> time first.
> 
> I meant that keep it returning 0 (no error), but instead of a debug print, use pr_warn. Or maybe pr_warn_once for now.

Switching to pr_warn_once() sounds reasonable to me.

I'll try to give this a test-run sometime next week.

Regards,

Hans


  reply	other threads:[~2023-03-03 15:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 22:04 IPU3 cameras not working with latest kernel code ? Hans de Goede
2023-02-24  8:14 ` Sakari Ailus
2023-02-24 14:20   ` Sakari Ailus
2023-03-02 20:22 ` [PATCH 1/1] media: v4l: subdev: Make link validation safer Sakari Ailus
2023-03-03  8:41   ` Tomi Valkeinen
2023-03-03 11:30     ` Sakari Ailus
2023-03-03 11:36       ` Tomi Valkeinen
2023-03-03 15:06         ` Hans de Goede [this message]
2023-03-03 17:18           ` Sakari Ailus
2023-03-09 12:09   ` Hans de Goede
2023-03-09 12:28     ` Sakari Ailus
  -- strict thread matches above, loose matches on Subject: below --
2023-03-09 12:27 Sakari Ailus
2023-03-09 12:34 ` Tomi Valkeinen
2023-03-09 12:35   ` Sakari Ailus
2023-03-09 12:34 ` Sakari Ailus
2023-03-09 12:43 ` Hans de Goede
2023-03-09 12:56   ` Sakari Ailus
2023-03-09 12:57     ` Tomi Valkeinen
2023-03-09 13:00       ` Sakari Ailus
2023-03-09 13:05         ` Hans de Goede
2023-03-12 13:01 ` Laurent Pinchart

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=49f77774-b34b-130d-a761-9a087c1d4ea8@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=hpa@redhat.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.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