kernel -- syscons: Resolve unmatched PHOLD() for MOUSE_MODE ioctl.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Thu, 21 Mar 2013 07:50:52 +0000 (03:50 -0400)
committerSascha Wildner <saw@online.de>
Thu, 21 Mar 2013 18:35:28 +0000 (19:35 +0100)
commitc3ab84cc4b098e768a5ab0e74ea571534875a455
tree0236c3d0a821e654e818c7880b9264d151405505
parent60e67e3ff6e88ef17fa7a32cb7ead501121df881
kernel -- syscons: Resolve unmatched PHOLD() for MOUSE_MODE ioctl.

When a syscons process put itself into MOUSE_MODE, a process-hold
was being placed to stabilize the process for signal delivery. The
hold was not being released on process exit, however.

This change reworks syscons to install a per-process flag as to
whether it is in MOUSE_MODE or not and to remove the excess hold on
exit(). It also cleans up the error handling and prevents stale
process pointers from lingering in syscons stat structures.

Reported-by: mneumann, Studbolt
Closes-bug: 2521
sys/dev/misc/syscons/Makefile
sys/dev/misc/syscons/scmouse.c
sys/sys/proc.h