Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753485AbYJaEWo (ORCPT ); Fri, 31 Oct 2008 00:22:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750741AbYJaEWf (ORCPT ); Fri, 31 Oct 2008 00:22:35 -0400 Received: from yx-out-2324.google.com ([74.125.44.28]:47042 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbYJaEWe (ORCPT ); Fri, 31 Oct 2008 00:22:34 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=s8Z/NyKHucydqSqJ3UKTcZsDWpjxKmTzMgO7U1b5EsvVjHhfhH0oXy338fvu3xnGwm AX8MqSVflLziPOldsDikHq6EIk3mSR1vJ2OpFzw+H2HVRxAxUuw3fYhydOJUn7DUBCOJ lpO9AAFLqAFdZyPhDl30q4lv8dC0/8v6bkP3Y= Message-ID: <386072610810302122i31844850y8aac0d6033e3cc62@mail.gmail.com> Date: Fri, 31 Oct 2008 12:22:33 +0800 From: "Bryan Wu" To: "Kay Sievers" Subject: Re: 2.6.28-rc2: (mtd)block/partitions BUG with kobject reference count Cc: "Peter Korsgaard" , "Rafael J. Wysocki" , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <87ej1z4ep8.fsf@macbook.be.48ers.dk> <200810300027.19116.rjw@sisk.pl> <87abcnj810.fsf@macbook.be.48ers.dk> X-Google-Sender-Auth: e843686c7f06dc8d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1776 Lines: 40 On Fri, Oct 31, 2008 at 5:51 AM, Kay Sievers wrote: > On Thu, Oct 30, 2008 at 00:28, Peter Korsgaard wrote: >>>>>>> "Rafael" == Rafael J Wysocki writes: >> >> Rafael> On Wednesday, 29 of October 2008, Peter Korsgaard wrote: >> >> Hi, >> >> >> >> I'm seing what looks like a kobject reference count issue with >> >> mtdblock_ro + mtd_dataflash + mtd partitions and repeated unbind/bind. >> >> I'm on 2.6.28-rc2, but I can reproduce the problem on 2.6.27 as well. >> >> Rafael> Is it reproducible with 2.6.26 too? >> >> Sorry, I haven't backported my platform support code to such "old" >> kernel. I can do it though, if you think it will help pinpoint the >> issue. > > This sounds like a possible reason for the problem: > "After digging into the mtd code, this bug is not related to our driver. It > should be a subtle bug in mtd core code. > > In add_mtd_partition, for 2 partitions, 2 gendisk structures will be > allocated. But these 2 gendisk->queue will be set to the same > request_queue. Then when unregistering the 1st partition, from the > same request_queue->backing_dev_info, the bdi struct will be set to > NULL. So for the 2nd partition (bdi == NULL), the sysfs dir of 2nd > partition will not be removed. Finally, when modprobe the module > again, the 2nd partition won't be added" > https://blackfin.uclinux.org/gf/tracker/4463 > Yes, I found the similar issue on Blackfin. And kernel 2.6.26, 2.6.27 and also latest 2.6.28-rc2 have this bug. -Bryan -- 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/