lkml.org 
[lkml]   [2011]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: fix refcounting in BLKBSZSET
On Thu, Feb 24, 2011 at 03:48:33PM +0100, Miklos Szeredi wrote:
> [and lkml cc-d too]
>
> This fixes bug 29202 in the 2.6.38 regression list.
>
> Please apply.
>
> Thanks,
> Miklos
>
> ----
> Subject: block: fix refcounting in BLKBSZSET
>
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> Adam Kovari and others reported that disconnecting an USB drive with
> an ntfs-3g filesystem would cause "kernel BUG at fs/inode.c:1421!" to
> be triggered.
>
> The BUG could be traced back to ioctl(BLKBSZSET), which would
> erroneously decrement the refcount on the bdev. This is because
> blkdev_get() 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().
>
> Reported-by: Adam Kovari <kovariadam@gmail.com>
> CC: Tejun Heo <tj@kernel.org>
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>

Ah, it was me after all. Sorry about that.

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-02-24 15:59    [W:0.043 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site