kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] virtio_blk: lock() => unlock() typo in
@ 2012-01-03 14:45 Dan Carpenter
  2012-01-03 15:31 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-01-03 14:45 UTC (permalink / raw)
  To: Rusty Russell; +Cc: virtualization, kernel-janitors, Michael S. Tsirkin

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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] virtio_blk: lock() => unlock() typo in
  2012-01-03 14:45 [patch] virtio_blk: lock() => unlock() typo in Dan Carpenter
@ 2012-01-03 15:31 ` Michael S. Tsirkin
  2012-01-04  2:44   ` [patch] virtio_blk: lock() => unlock() typo in virtblk_config_changed_work() Rusty Russell
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2012-01-03 15:31 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: kernel-janitors, virtualization

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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] virtio_blk: lock() => unlock() typo in virtblk_config_changed_work()
  2012-01-03 15:31 ` Michael S. Tsirkin
@ 2012-01-04  2:44   ` Rusty Russell
  0 siblings, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2012-01-04  2:44 UTC (permalink / raw)
  To: Michael S. Tsirkin, Dan Carpenter; +Cc: kernel-janitors, virtualization

On Tue, 3 Jan 2012 17:31:28 +0200, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 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>

Indeed, I folded it into that patch.

Thanks!
Rusty.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-04  2:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 14:45 [patch] virtio_blk: lock() => unlock() typo in Dan Carpenter
2012-01-03 15:31 ` Michael S. Tsirkin
2012-01-04  2:44   ` [patch] virtio_blk: lock() => unlock() typo in virtblk_config_changed_work() Rusty Russell

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).