From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 2 Mar 2017 11:44:53 +0000 From: Al Viro To: Jan Kara Cc: Dmitry Vyukov , "linux-fsdevel@vger.kernel.org" , LKML , Jens Axboe , Andrew Morton , Tejun Heo , Johannes Weiner , "linux-mm@kvack.org" , Andrey Ryabinin , syzkaller Subject: Re: mm: GPF in bdi_put Message-ID: <20170302114453.GX29622@ZenIV.linux.org.uk> References: <20170227182755.GR29622@ZenIV.linux.org.uk> <20170301142909.GG20512@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170301142909.GG20512@quack2.suse.cz> Sender: owner-linux-mm@kvack.org List-ID: On Wed, Mar 01, 2017 at 03:29:09PM +0100, Jan Kara wrote: > The problem is writeback code (from flusher work or through sync(2) - > generally inode_to_bdi() users) can be looking at bdev inode independently > from it being open. So if they start looking while the bdev is open but the > dereference happens after it is closed and device removed, we oops. We have > seen oopses due to this for quite a while. And all the stuff that is done > in __blkdev_put() is not enough to prevent writeback code from having a > look whether there is not something to write. Um. What's to prevent the queue/device/module itself from disappearing from under you? IOW, what are you doing that is safe to do in face of driver going rmmoded? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org