Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2019 19:14:02 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r355355 - in stable: 11/sys/dev/snp 12/sys/dev/snp
Message-ID:  <201912031914.xB3JE2o8079214@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Tue Dec  3 19:14:02 2019
New Revision: 355355
URL: https://svnweb.freebsd.org/changeset/base/355355

Log:
  MFC r355205: 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:
  stable/11/sys/dev/snp/snp.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/dev/snp/snp.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/dev/snp/snp.c
==============================================================================
--- stable/11/sys/dev/snp/snp.c	Tue Dec  3 19:00:12 2019	(r355354)
+++ stable/11/sys/dev/snp/snp.c	Tue Dec  3 19:14:02 2019	(r355355)
@@ -174,7 +174,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)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912031914.xB3JE2o8079214>