lkml.org 
[lkml]   [2006]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] auth_gss: unregister gss_domain when unloading module
On Tuesday October 31, akinobu.mita@gmail.com wrote:
>
> But I noticed that even if we have this kind of smp-safe code, there
> is no guarantee that 2nd auth_domain_put() in
> svcauth_gss_unregister_pseudoflavor() is the last reference of
> this gss_domain.
>
> So it is possible to happen invalid dereference by real last user of
> this gss_domain after unloading module. If this is not wrong,
> Is it neccesary to have try_get_module()/put_module() somewhere to
> prevent this?

After a quick look, it seems to me that one reasonable option would
be:

svcauth_gss_register_pseudoflavor
returns a void* which is 'new', and possible calls try_get_module(),
failing if that fails. and
svcauth_gss_unregister_pseudoflavor
takes the void* (not a name) and calls auth_domain_put on it, and
then calls put_module().

'struct pf_desc' would have to gain a
void * handle;
to hold the returned value.

Would that solve the problem as you see it?

NeilBrown
-
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: 2006-10-31 05:15    [W:0.047 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site