Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 12 Sep 2002 08:58:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 12 Sep 2002 08:58:47 -0400 Received: from dp.samba.org ([66.70.73.150]:34518 "EHLO lists.samba.org") by vger.kernel.org with ESMTP id ; Thu, 12 Sep 2002 08:58:46 -0400 From: Rusty Russell To: Roman Zippel Cc: Jamie Lokier , Alexander Viro , Daniel Phillips , linux-kernel@vger.kernel.org Subject: Re: [RFC] Raceless module interface In-reply-to: Your message of "Thu, 12 Sep 2002 13:27:10 +0200." Date: Thu, 12 Sep 2002 23:03:18 +1000 Message-Id: <20020912130337.3FFBF2C1CD@lists.samba.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1552 Lines: 36 In message you write: > Sigh, please let's analyze the complete problem first, before making any > more kludges. > Every (loaded) module is at least registered with two hooks in the kernel > - the module structure and a driver structure (e.g. file_system_type for > fs). During unloading we have to remove these hooks safely again. > A module basically goes through these stages during its lifetime: > 1. module load > 2. module init > 3. module exit > 4. module unload > The problem now is stage 3, as it's not allowed to fail. This means before Nope, that's one of the two problems. Read my previous post: the other is partial initialization. Your patch is two-stage delete, with the additional of a usecount function. So you have to move the usecount from the module to each object it registers: great for filesystems, but I don't think it buys you anything (since they were easy anyway). Moreover, I don't see where your patch prevented someone increasing the module count during try_unregister_module(), so that check is pointless (do it in userspace unless they specify rmmod -f). Alexey said we needed two-stage module delete back in 1999, so this is not a new idea... Rusty. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/