Re: [PATCH 2/2] auth_gss: unregister gss_domain when unloading module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday October 31, [email protected] 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux