Subject: Re: CVS commit: src/sys/dev/ic
To: None <elad@netbsd.org>
From: Juan RP <juan@xtrarom.org>
List: source-changes
Date: 07/22/2006 11:35:56
On Sat, 22 Jul 2006 09:22:21 +0000 (UTC)
Elad Efrat <elad@netbsd.org> wrote:
>
> Module Name: src
> Committed By: elad
> Date: Sat Jul 22 09:22:21 UTC 2006
>
> Modified Files:
> src/sys/dev/ic: com.c
>
> Log Message:
> don't call kauth_authorize_generic() when holding a lock, from yamt@.
Now it does not build, undefined 'p'.
What about this patch instead?
Index: com.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/com.c,v
retrieving revision 1.249
diff -u -p -r1.249 com.c
--- com.c 22 Jul 2006 09:22:21 -0000 1.249
+++ com.c 22 Jul 2006 09:35:01 -0000
@@ -1022,8 +1022,8 @@ comioctl(dev_t dev, u_long cmd, caddr_t
error = 0;
switch (cmd) {
case TIOCSFLAGS:
- error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag);
+ error = kauth_authorize_generic(l->l_proc->p_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag);
break;
default:
/* nothing */