All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [patch] virtio_blk: lock() => unlock() typo in
Date: Tue, 03 Jan 2012 15:31:28 +0000	[thread overview]
Message-ID: <20120103153127.GA8440@redhat.com> (raw)
In-Reply-To: <20120103144513.GB21712@elgon.mountain>

On Tue, Jan 03, 2012 at 05:45:13PM +0300, Dan Carpenter wrote:
> This will deadlock.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index f3d77b3..ba73661 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -352,7 +352,7 @@ static void virtblk_config_changed_work(struct work_struct *work)
>  
>  	set_capacity(vblk->disk, capacity);
>  done:
> -	mutex_lock(&vblk->config_lock);
> +	mutex_unlock(&vblk->config_lock);
>  }
>  
>  static void virtblk_config_changed(struct virtio_device *vdev)

Good catch.
Acked-by: Michael S. Tsirkin <mst@redhat.com>


WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [patch] virtio_blk: lock() => unlock() typo in virtblk_config_changed_work()
Date: Tue, 3 Jan 2012 17:31:28 +0200	[thread overview]
Message-ID: <20120103153127.GA8440@redhat.com> (raw)
In-Reply-To: <20120103144513.GB21712@elgon.mountain>

On Tue, Jan 03, 2012 at 05:45:13PM +0300, Dan Carpenter wrote:
> This will deadlock.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index f3d77b3..ba73661 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -352,7 +352,7 @@ static void virtblk_config_changed_work(struct work_struct *work)
>  
>  	set_capacity(vblk->disk, capacity);
>  done:
> -	mutex_lock(&vblk->config_lock);
> +	mutex_unlock(&vblk->config_lock);
>  }
>  
>  static void virtblk_config_changed(struct virtio_device *vdev)

Good catch.
Acked-by: Michael S. Tsirkin <mst@redhat.com>

  reply	other threads:[~2012-01-03 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 14:45 [patch] virtio_blk: lock() => unlock() typo in Dan Carpenter
2012-01-03 14:45 ` [patch] virtio_blk: lock() => unlock() typo in virtblk_config_changed_work() Dan Carpenter
2012-01-03 15:31 ` Michael S. Tsirkin [this message]
2012-01-03 15:31   ` Michael S. Tsirkin
2012-01-04  2:32   ` Rusty Russell
2012-01-04  2:44     ` Rusty Russell

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=20120103153127.GA8440@redhat.com \
    --to=mst@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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 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.