]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively,
authorKonstantin Belousov <kib@FreeBSD.org>
Thu, 13 Sep 2012 13:05:45 +0000 (13:05 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 13 Sep 2012 13:05:45 +0000 (13:05 +0000)
commitdf3cbc41faf777f0d44d43a4924ce305759eabdf
tree4a1c7c3f5e51132eef47883a5fc11727375f8e2c
parent0cf7f1865b77d766c9e06acf89389497dd4be76f
The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively,
which is an elaborate way to cause kernel panic. Change the VOPs
implementation to return EBADF for a reclaimed vnode.

While the calls to vop_bmap should not reach deadfs, it is indeed
possible for vop_ioctl, because the VOP locking protocol is to pass
the vnode to VOP unlocked. The actual panic was observed when ioctl
was called on procfs filedescriptor which pointed to an exited
process.

Reported by: zont
Tested by: pho
MFC after: 1 week
sys/fs/deadfs/dead_vnops.c