kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] blkcg: change a spin_lock() to spin_lock_irq()
@ 2012-03-29 18:51 Dan Carpenter
  2012-03-29 18:57 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-03-29 18:51 UTC (permalink / raw)
  To: Jens Axboe, Tejun Heo; +Cc: linux-kernel, kernel-janitors

Smatch complains that we re-enable IRQs twice.  It looks like we forgot
to disable them here on the spin_trylock() failure path.  This was added
in 9f13ef678e "blkcg: use double locking instead of RCU for blkg
synchronization".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 74a76a8..bf4b76e 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1598,7 +1598,7 @@ static int blkiocg_pre_destroy(struct cgroup *cgroup)
 		} else {
 			spin_unlock_irq(&blkcg->lock);
 			cpu_relax();
-			spin_lock(&blkcg->lock);
+			spin_lock_irq(&blkcg->lock);
 		}
 	}
 

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

* Re: [patch] blkcg: change a spin_lock() to spin_lock_irq()
  2012-03-29 18:51 [patch] blkcg: change a spin_lock() to spin_lock_irq() Dan Carpenter
@ 2012-03-29 18:57 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2012-03-29 18:57 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Tejun Heo, linux-kernel, kernel-janitors

On 2012-03-29 20:51, Dan Carpenter wrote:
> Smatch complains that we re-enable IRQs twice.  It looks like we forgot
> to disable them here on the spin_trylock() failure path.  This was added
> in 9f13ef678e "blkcg: use double locking instead of RCU for blkg
> synchronization".

Thanks, that is indeed a screwup. Fix applied.

-- 
Jens Axboe


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

end of thread, other threads:[~2012-03-29 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29 18:51 [patch] blkcg: change a spin_lock() to spin_lock_irq() Dan Carpenter
2012-03-29 18:57 ` Jens Axboe

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