Subject: Re: kauth sleepability (Re: CVS commit: src/share/man/man9)
To: None <elad@NetBSD.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 07/21/2006 08:43:00
> > void
> > assert_sleepable(struct simplelock *interlock, const char *msg)
> > {
> >
> > simple_lock_only_held(interlock, msg);
> > spinlock_switchcheck();
> > }
>
> pardon my ignorance, but what do i pass as 'interlock'?
in the case of kauth_authorize_action, NULL.
> as you could
> have guessed from my previous question, this is hardly something i'm
> familiar with, nor do i have the time to dig into it.
you can put the following fragment at the top of kauth_authorize_action.
(please test)
#if defined(LOCKDEBUG)
spinlock_switchcheck();
simple_lock_only_held(NULL, "kauth_authorize_action");
#endif
YAMAMOTO Takashi