linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: "media: vb2: add (un)prepare_streaming queue ops" causes vb2_queue->streaming to be set earlier ?
Date: Wed, 7 Dec 2022 22:23:15 +0100	[thread overview]
Message-ID: <545610e7-3446-2b82-60dc-7385fea3774f@redhat.com> (raw)

Hi Hans,

I just fixed a crash in the out of tree driver which is caused by:

a10b21532574 ("media: vb2: add (un)prepare_streaming queue ops")

I know that breaking out of tree code is fine / not our problem,
but I wonder if this maybe affects some in tree code too ?

The problem with the out of tree driver is that it
used vb2_queue->streaming inside the buf_queue() callback
to determine if the buffer was being pre-queued (from
vb2_start_streaming() calling __enqueue_in_driver()) before
the start_streaming queue-op is called.

Or if it was being queued after the start_streaming queue-op
has been called.

With vb2_queue->streaming now being set before the
 __enqueue_in_driver() calls in vb2_start_streaming() this
broke and it went down the route to see if there was
space available in the hw-queue which NULL pointer deref-ed
because the hw-queue had not been setup yet (more or less).

This is fixed now as far as the ipu6 driver is concerned,
but I wonder if we may not have in tree drivers making
similar assumptions about vb2_queue->streaming in their
buf_queue() callbacks ?

Regards,

Hans





             reply	other threads:[~2022-12-07 21:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 21:23 Hans de Goede [this message]
2022-12-08  7:40 ` "media: vb2: add (un)prepare_streaming queue ops" causes vb2_queue->streaming to be set earlier ? Hans Verkuil
2023-01-20 19:03   ` 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=545610e7-3446-2b82-60dc-7385fea3774f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.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;
as well as URLs for NNTP newsgroup(s).