]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix locking race in ttymodem(). The locking of the proctree happens too late
authorMartin Blapp <mbr@FreeBSD.org>
Sun, 10 Sep 2006 16:51:56 +0000 (16:51 +0000)
committerMartin Blapp <mbr@FreeBSD.org>
Sun, 10 Sep 2006 16:51:56 +0000 (16:51 +0000)
commitf976eefa00b4bf0c922fe89f80290808612057fd
tree721801b921fbb554499b09e7091f8e58f1d08f7c
parent16b392d51da3c8a2013cacc6a648dc68e1dae433
Fix locking race in ttymodem(). The locking of the proctree happens too late
and opens a small race window before tp->t_session->s_leader is accessed. In case
tp->t_session has just been set to NULL elsewhere, we get a panic().

This fix is a bandaid until someone else fixes the whole locking in the tty subsystem.
Definitly more work needs to be done.

MFC after: 1 week
Reviewed by: mlaier
PR: kern/103101
sys/kern/tty.c