Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 4 Jul 2002 00:05:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 4 Jul 2002 00:05:50 -0400 Received: from rj.sgi.com ([192.82.208.96]:16319 "EHLO rj.sgi.com") by vger.kernel.org with ESMTP id ; Thu, 4 Jul 2002 00:05:49 -0400 X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Linux-Kernel Mailing List Subject: Re: simple handling of module removals Re: [OKS] Module removal In-reply-to: Your message of "Wed, 03 Jul 2002 22:25:34 -0400." <3D23B21E.9030102@didntduck.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 Jul 2002 14:08:13 +1000 Message-ID: <12364.1025755693@kao2.melbourne.sgi.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 670 Lines: 15 On Wed, 03 Jul 2002 22:25:34 -0400, Brian Gerst wrote: >Why not treat a module just like any other structure? Obtain a >reference to it _before_ using it. That is what try_inc_use_count() does. But the interface is messy and difficult to audit. It relies on the caller taking some other lock first to ensure that the module address will not change while you are trying to call try_inc_use_count. - 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/