From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: [PATCH 2/2] [media] media-device: better lock media_device_unregister()
Date: Mon, 21 Dec 2015 09:38:56 -0300 [thread overview]
Message-ID: <5677F2E0.2010503@osg.samsung.com> (raw)
In-Reply-To: <cda0486f763fc1c2f5267c3a0806cf297317301b.1450176187.git.mchehab@osg.samsung.com>
Hello Mauro,
On 12/15/2015 07:43 AM, Mauro Carvalho Chehab wrote:
> If media_device_unregister() is called by two different
> drivers, a race condition may happen, as the check if the
> device is not registered is not protected.
>
> Move the spin_lock() to happen earlier in the function, in order
> to prevent such race condition.
>
> Reported-by: Shuah Khan <shuahkh@osg.samsung.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
The patch looks good and I also tested it on an OMAP3 IGEPv2 board:
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
next prev parent reply other threads:[~2015-12-21 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 10:43 [PATCH 1/2] [media] media-device: move media entity register/unregister functions Mauro Carvalho Chehab
2015-12-15 10:43 ` [PATCH 2/2] [media] media-device: better lock media_device_unregister() Mauro Carvalho Chehab
2015-12-21 12:38 ` Javier Martinez Canillas [this message]
2015-12-21 12:35 ` [PATCH 1/2] [media] media-device: move media entity register/unregister functions Javier Martinez Canillas
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=5677F2E0.2010503@osg.samsung.com \
--to=javier@osg.samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.com \
--cc=shuahkh@osg.samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.