All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@dowhile0.org>
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>,
	Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH 2/2] [media] avoid double locks with graph_mutex
Date: Mon, 28 Mar 2016 15:38:13 -0400	[thread overview]
Message-ID: <CABxcv==hBbnzkX9N_6cSMwVqTZ18jps8_u_nRMgKGXSK8vXjMg@mail.gmail.com> (raw)
In-Reply-To: <3cabc4b828abac3c6dea240ae22d4754a438ad1b.1459188623.git.mchehab@osg.samsung.com>

Hello Mauro,

On Mon, Mar 28, 2016 at 2:11 PM, Mauro Carvalho Chehab
<mchehab@osg.samsung.com> wrote:
> Add a note at the headers telling that the link setup
> callbacks are called with the mutex hold. Also, removes a
> double lock at the PM suspend callbacks.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
>  drivers/media/media-device.c      | 1 -
>  drivers/media/v4l2-core/v4l2-mc.c | 4 ----
>  include/media/media-device.h      | 3 ++-
>  include/media/media-entity.h      | 3 +++
>  4 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
> index 6cfa890af7b4..6af5e6932271 100644
> --- a/drivers/media/media-device.c
> +++ b/drivers/media/media-device.c
> @@ -93,7 +93,6 @@ static struct media_entity *find_entity(struct media_device *mdev, u32 id)
>         media_device_for_each_entity(entity, mdev) {
>                 if (((media_entity_id(entity) == id) && !next) ||
>                     ((media_entity_id(entity) > id) && next)) {
> -                       mutex_unlock(&mdev->graph_mutex);

This change belongs to patch 1/2.

After this change, feel free to add to both patches:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
Javier

  reply	other threads:[~2016-03-28 19:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 22:22 [PATCH 0/2] media: Revert broken locking changes Laurent Pinchart
2016-03-24 22:22 ` [PATCH 1/2] Revert "[media] media-device: use kref for media_device instance" Laurent Pinchart
2016-03-24 22:22 ` [PATCH 2/2] Revert "[media] media-device: get rid of the spinlock" Laurent Pinchart
2016-03-28 18:09 ` [PATCH 0/2] media: Revert broken locking changes Mauro Carvalho Chehab
2016-03-28 18:11   ` [PATCH 1/2] [media] media-device: Fix mutex handling code for ioctl Mauro Carvalho Chehab
2016-03-28 18:11     ` [PATCH 2/2] [media] avoid double locks with graph_mutex Mauro Carvalho Chehab
2016-03-28 19:38       ` Javier Martinez Canillas [this message]
2016-03-28 22:06       ` Sakari Ailus
2016-03-29  9:17         ` Mauro Carvalho Chehab
2016-03-29  9:28           ` Mauro Carvalho Chehab
2016-03-29  9:38             ` Sakari Ailus
2016-03-28 21:58     ` [PATCH 1/2] [media] media-device: Fix mutex handling code for ioctl Sakari Ailus
2016-03-29  9:07       ` Mauro Carvalho Chehab
2016-03-28 19:28   ` [PATCH 0/2] media: Revert broken locking changes Javier Martinez Canillas
2016-03-28 19:29   ` Laurent Pinchart
2016-03-28 20:15     ` Mauro Carvalho Chehab

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='CABxcv==hBbnzkX9N_6cSMwVqTZ18jps8_u_nRMgKGXSK8vXjMg@mail.gmail.com' \
    --to=javier@dowhile0.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.com \
    --cc=sakari.ailus@iki.fi \
    --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.