svn commit: r355205 - head/sys/dev/snp
Kyle Evans
kevans at FreeBSD.org
Fri Nov 29 03:51:02 UTC 2019
Author: kevans
Date: Fri Nov 29 03:51:01 2019
New Revision: 355205
URL: https://svnweb.freebsd.org/changeset/base/355205
Log:
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.
Modified:
head/sys/dev/snp/snp.c
Modified: head/sys/dev/snp/snp.c
==============================================================================
--- head/sys/dev/snp/snp.c Fri Nov 29 03:31:47 2019 (r355204)
+++ head/sys/dev/snp/snp.c Fri Nov 29 03:51:01 2019 (r355205)
@@ -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)) {
More information about the svn-src-all
mailing list