Giant might have been temporarily dropped while waiting for proctree_lock, allowing for an

intervening tty_close() that cleared tp->t_session.

Submitted by:	tegge
MFC:		1 day
This commit is contained in:
Martin Blapp 2006-12-19 22:34:32 +00:00
parent 87a1c270c6
commit b472f371b2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165358

View File

@ -1649,7 +1649,7 @@ ttymodem(struct tty *tp, int flag)
CLR(tp->t_state, TS_CONNECTED);
if (tp->t_session) {
sx_slock(&proctree_lock);
if (tp->t_session->s_leader) {
if (tp->t_session && tp->t_session->s_leader) {
struct proc *p;
p = tp->t_session->s_leader;