[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160829205439.GG28713@mtj.duckdns.org>
Date: Mon, 29 Aug 2016 16:54:39 -0400
From: Tejun Heo <tj@...nel.org>
To: Vegard Nossum <vegard.nossum@...cle.com>
Cc: Rabin Vincent <rabin@....in>, Jens Axboe <axboe@...com>,
Jan Kara <jack@...e.cz>, Al Viro <viro@...iv.linux.org.uk>,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] bdev: fix NULL pointer dereference in sync()/close() race
Hello,
On Mon, Aug 29, 2016 at 10:49:57PM +0200, Vegard Nossum wrote:
> That didn't work at all. I guess bd_acquire() would just do a bdgrab()
> and not touch ->bd_holders, whereas blkdev_get() would increment
Yeah, bdev has two different refs - one for bdev struct itself and the
other for the actual accessors.
> bd_holders and therefore prevent __blkdev_put() from freeing the block
> device? Too confusing...
I think you'll need to do the actual blkdev_get or one of its
variants.
Thanks.
--
tejun
Powered by blists - more mailing lists