Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226Ab1BXOzL (ORCPT ); Thu, 24 Feb 2011 09:55:11 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:64465 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751835Ab1BXOzI (ORCPT ); Thu, 24 Feb 2011 09:55:08 -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=pBzHQFALpAd8jZg9ejGk3dxji5bAKJIfvUKXu+yvbsr5zOWQW3hLbpATCGDF0VqjJC X59jU3YYTLVSqLvaFYsqH3+O37/apS/FIP2zbeq3OU9mr2v3cym0OHnZIfTzjuACEwIR MbUT/vAF/GFtohd3iuAaVJ4WMxl+nuEZrXw20= Date: Thu, 24 Feb 2011 15:55:03 +0100 From: Tejun Heo To: Miklos Szeredi Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org, rjw@sisk.pl, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: fix refcounting in swapon Message-ID: <20110224145503.GP7840@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: 848 Lines: 25 On Thu, Feb 24, 2011 at 03:49:53PM +0100, Miklos Szeredi wrote: > From: Miklos Szeredi > > 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 > Signed-off-by: Miklos Szeredi 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/