Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > (3) Even if it was... just filling in the syscall slot from a module means
> >     that it is possible for the module to be unloaded whilst the syscall is in
> >     use.
> > 
> > David Howells
> 
> The following scheme might work:
> 
> On module load: INC_MOD_USE_COUNT
> 
> In the module
> 
> int handle_unload_preparation()
> {
>       if (!suser())
>               return -EPERM;
> 
>       lock_kernel();
>       *call_table_entry = dummy_function;
>       wmb();
>       unlock_kernel();
> 
>       return 0;
> }
> 
>       Regards
>               Oliver

How does handle_unload_preparation() get invoked? And does lock_kernel()
suppress syscall access?

David Howells
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to