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 Thu, Dec 24, 2009 at 8:00 PM, Thor Lancelot Simon <> 
> On Thu, Dec 24, 2009 at 06:05:25PM -0500, Elad Efrat wrote:
>> If this is sensible, my first step will be extracting the guts of
>> assert_sleepable() to is_sleepable() so we don't always trip a panic()
>> if we can't sleep.
> Without taking a mutex, how will you know you're *still* sleepable
> when you actually do the free?  It seems to me is_sleepable must
> acquire a mutex and anything which could take us to interrupt
> context must... ugh.

Can thread "sleepability" change during the execution of this thread?
I thought if we're called from interrupt context we can't sleep, if
we're just executing "normally" we can. In other words, if in one
moment we can sleep and in another we can't in the same execution
flow, what guarantees you that *anything* won't execute in
non-sleepable context...?


Home | Main Index | Thread Index | Old Index