Re: [PATCH] mm: fix refcounting in swapon

From: Tejun Heo
Date: Thu Feb 24 2011 - 09:55:15 EST

On Thu, Feb 24, 2011 at 03:49:53PM +0100, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@xxxxxxx>
> Grab a reference to bdev before calling blkdev_get(), which expects
> the refcount to be already incremented and either returns success or
> decrements the refcount and returns an error.
> The bug was introduced by e525fd89 (block: make blkdev_get/put()
> handle exclusive access), which didn't take into account this behavior
> of blkdev_get().
> CC: Tejun Heo <tj@xxxxxxxxxx>
> Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at