Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756212AbXKFVHT (ORCPT ); Tue, 6 Nov 2007 16:07:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754401AbXKFVHB (ORCPT ); Tue, 6 Nov 2007 16:07:01 -0500 Received: from mout1.freenet.de ([195.4.92.91]:46923 "EHLO mout1.freenet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754445AbXKFVHA convert rfc822-to-8bit (ORCPT ); Tue, 6 Nov 2007 16:07:00 -0500 Date: Tue, 06 Nov 2007 22:07:32 +0100 To: "Tejun Heo" , "Peter Osterlund" Subject: Re: pktcdvd oops Reply-To: balagi@justmail.de From: "Thomas Maier" Cc: "Jens Axboe" , linux-kernel , gregkh@suse.de Content-Type: text/plain; charset=US-ASCII MIME-Version: 1.0 References: <20071105092018.GD5359@kernel.dk> <47302E9F.6020708@gmail.com> Content-Transfer-Encoding: 7BIT Message-ID: In-Reply-To: <47302E9F.6020708@gmail.com> User-Agent: Opera Mail/9.24 (Win32) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1663 Lines: 57 Hello, have not tested it yet, but i quess, the code mentioned by Peter is in pkt_new_dev() that is called by pkt_setup_dev(): /* This is safe, since we have a reference from open(). */ __module_get(THIS_MODULE); So, now, there must be checks in every sysfs operation in the module code, to ensure that the module is still loaded? BTW: the bug report says: Steps to reproduce: modprobe pktcdvd echo 22:0 >/sys/class/pktcdvd/add Is there any module unload??? Why is the module not available after the modprobe, but the sysfs entries, generated by the module? Confused ;) -Thomas Am 06.11.2007, 10:06 Uhr, schrieb Tejun Heo : > [Greg cc'd] > > Peter Osterlund wrote: >> On Mon, 5 Nov 2007, Jens Axboe wrote: >> >>> Hi Peter, >>> >>> You don't seem to have a bugzilla account, so could not reassign to you. >>> See http://bugzilla.kernel.org/show_bug.cgi?id=9294 >> >> Problem is repeatable on my computer. It dies in __module_get() on this >> line: >> >> BUG_ON(module_refcount(module) == 0); >> >> I think this is because commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15, >> which states: "Note that with this change, userland holding a sysfs node >> does not prevent the backing module from being unloaded." >> >> Unfortunately, I don't know how this sysfs stuff is supposed to work, >> and therefore don't know how to fix the problem. > > Does this fix the problem? > - 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/