kqueue - Fix bad error path triggered by emacs
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Jul 2010 01:08:18 +0000 (18:08 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Jul 2010 01:08:18 +0000 (18:08 -0700)
commit767629739cccd8cca9182968efc7e04bab6912ac
tree72afe8ed5c162bed98ab57c6eef8863081ae3c01
parentd3da9217c886ea92bbae229564239d6ce3bf79c4
kqueue - Fix bad error path triggered by emacs

* Some device d_kqfilter functions were not setting ap->a_result,
  leading to an error being improperly returned and knotes left
  hanging.  This led to a lockup and/or a panic when running emacs.

* Adjust dev_dkqfilter() to preset ap->a_result to 0 to fix the
  problem and document it.

Reported-by: Sascha Wildner <swildner@erpicon.de>
sys/kern/kern_device.c