Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755565Ab1BXOz6 (ORCPT ); Thu, 24 Feb 2011 09:55:58 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:65148 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752141Ab1BXOzJ (ORCPT ); Thu, 24 Feb 2011 09:55:09 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=CiQui8kqgB0ozru7BSwRG8oWCiPIHxq+Vo9QJa8iE/2q/3y/EU2FvCeTSxZ2bQjUWz 1z+XI1ERv8QCUOeIXVFvMsFgqWOT8q7hjFRV0bRLUZkqHVpsstb+G6gnC5iU+f+xY+7A mWQOCgGt1/59w3BuyzRUjDJA5ghIT7J5MDRW0= Date: Thu, 24 Feb 2011 15:54:38 +0100 From: Tejun Heo To: Miklos Szeredi Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org, kovariadam@gmail.com, florian@mickler.org, rjw@sisk.pl, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: fix refcounting in BLKBSZSET Message-ID: <20110224145438.GO7840@htj.dyndns.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1367 Lines: 45 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 > > 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 > CC: Tejun Heo > Signed-off-by: Miklos Szeredi Ah, it was me after all. Sorry about that. Acked-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/