lkml.org 
[lkml]   [2002]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Raceless module interface
Date
In message <Pine.LNX.4.44.0209121043160.28515-100000@serv> 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/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.108 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site