Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262609AbUCEOg4 (ORCPT ); Fri, 5 Mar 2004 09:36:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262463AbUCEOg4 (ORCPT ); Fri, 5 Mar 2004 09:36:56 -0500 Received: from ozlabs.org ([203.10.76.45]:18613 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S262612AbUCEOeu (ORCPT ); Fri, 5 Mar 2004 09:34:50 -0500 Subject: Re: [RFC] add kobject to struct module From: Rusty Russell To: Greg KH Cc: linux-kernel@vger.kernel.org In-Reply-To: <20040224232940.GA3140@kroah.com> References: <20030911011644.DA21C2C335@lists.samba.org> <20040224232940.GA3140@kroah.com> Content-Type: multipart/mixed; boundary="=-pcZhvMtZ2Xx9NiLLySld" Message-Id: <1078497241.2492.908.camel@bach> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 06 Mar 2004 01:34:02 +1100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6035 Lines: 102 --=-pcZhvMtZ2Xx9NiLLySld Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, 2004-02-25 at 10:29, Greg KH wrote: > So, here's a patch on top of your patch (full patch against 2.6.3 is > below), that simply makes the module reference file be owned by the > module that it is assigned to. Yes, this means that when you actually > read the file value, the reference is 1 greater than when it is closed, > but that's the breaks. It does solve the "grab the file and then try to > unload the module" problem, as it simply prevents this from happening. > > Comments? I've rewritten your rewrite again 8) This patch actually implements module_param in sysfs for modules. You can see my tests in crypto_null(). What's missing is inbuilt modules. I think /sys/modules/ne2k/debug should exist whether ne2k is built-in or modular, for example. Since the only thing we have is a kparam with "ne2k.debug" as its name, there will have to be some kludgery here, but we can end up with something OK. Cheers, Rusty. -- Anyone who quotes me in their signature is an idiot -- Rusty Russell --=-pcZhvMtZ2Xx9NiLLySld Content-Disposition: attachment; filename=module_kobject.patch.gz Content-Type: application/x-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D njkwydEU3Oa1tIfc0yK5z4jwfpz6qsCBZ+ffTgfHBQVmE0HX1sv0ZuEBJUALULQMMJwvRHsCLqBV nZwooFFPT6pN3/CP5yHC91P16kSlPhWqAueIGiEvoOVYGfe0eYQkckFgH9aaWgQF0tAS/waBBvP1 RigAAA== --=-pcZhvMtZ2Xx9NiLLySld-- - 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/