snp: don't reference tp->t_mtx directly
This is the only part of snp(4) that pokes around in struct tty directly; replace it with the tty_getlock accessor to avoid struct tty internals.
This commit is contained in:
parent
74aed808a1
commit
ed6232893c
@ -178,7 +178,7 @@ snp_read(struct cdev *dev, struct uio *uio, int flag)
|
||||
error = EWOULDBLOCK;
|
||||
break;
|
||||
}
|
||||
error = cv_wait_sig(&ss->snp_outwait, tp->t_mtx);
|
||||
error = cv_wait_sig(&ss->snp_outwait, tty_getlock(tp));
|
||||
if (error != 0)
|
||||
break;
|
||||
if (tty_gone(tp)) {
|
||||
|
Loading…
Reference in New Issue
Block a user