tech-kern archive

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

Re: Deferred freeing of kauth_cred_ts



On Fri, 25 Dec 2009, Elad Efrat wrote:

> > +       SLIST_INSERT_HEAD(&kauth_thread_discard, cred, cr_list);
> >
> > should access to this SLIST be protected by a mutex?  There could be a
> > race between adding and removing..
>
> Yeah... would an IPL_HIGH mutex be fine there? (if I read mutex(9)
> right, we need a spin mutex for our purposes.)

Mm, I think you are right - guess you only need to hold it while accessing
the list (drop it before the free), unless there is a better method?
(somebody was working on atomic queues IIRC but I don't know how far along
that work is..)

iain


Home | Main Index | Thread Index | Old Index