public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dave Stevenson <dave.stevenson@raspberrypi.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	mchehab@kernel.org, linux-media@vger.kernel.org,
	"for 4.14 and up" <stable@vger.kernel.org>
Subject: Re: [PATCH v4.9 1/1] v4l: event: Add subscription to list before calling "add" operation
Date: Thu, 8 Nov 2018 12:28:53 -0500	[thread overview]
Message-ID: <20181108172853.GF8097@sasha-vm> (raw)
In-Reply-To: <20181108114606.17148-1-sakari.ailus@linux.intel.com>

On Thu, Nov 08, 2018 at 01:46:06PM +0200, Sakari Ailus wrote:
>[ upstream commit 92539d3eda2c090b382699bbb896d4b54e9bdece ]
>
>Patch ad608fbcf166 changed how events were subscribed to address an issue
>elsewhere. As a side effect of that change, the "add" callback was called
>before the event subscription was added to the list of subscribed events,
>causing the first event queued by the add callback (and possibly other
>events arriving soon afterwards) to be lost.
>
>Fix this by adding the subscription to the list before calling the "add"
>callback, and clean up afterwards if that fails.
>
>Fixes: ad608fbcf166 ("media: v4l: event: Prevent freeing event subscriptions while accessed")
>
>Reported-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
>Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
>Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
>Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
>Cc: stable@vger.kernel.org (for 4.14 and up)
>Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

Hi Sakari,

For the sake of completeness, can you sign off on the backport too and
indicate it was backported to 4.9 in the commit messge? Otherwise, this
commit message says it's for 4.14+ and will suddenly appear in the 4.9
tree, and if we have issues later it might cause confusion.

--
Thanks,
Sasha

      reply	other threads:[~2018-11-09  3:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 11:46 [PATCH v4.9 1/1] v4l: event: Add subscription to list before calling "add" operation Sakari Ailus
2018-11-08 17:28 ` Sasha Levin [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=20181108172853.GF8097@sasha-vm \
    --to=sashal@kernel.org \
    --cc=dave.stevenson@raspberrypi.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@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