e78e077985
if more than one thread tries to use it at the same time (hang, memory leak, panic). In a kernfs node, the fileops (open, close, read, write) gets a vnode, but no way to know the file descriptor from which the request comes from. As /kern/xen/xenbus interface is statefull (write sends a command and read gets the response), a way to track "clients" is needed. This commit implement states using the lwp pointer from the caller as a key. It will fail (with an error) if a kernfs file descriptor is reused by a child after a fork(), or if a file descriptor is shared by two threads of the same process but fortunably the xen tools using this interface don't do this. This should fixes occasional hangs of the Xen tools (one in "xbrd" state, others in tstile) reported on port-xen by Alaric Snell-Pym. |
||
---|---|---|
bin | ||
common | ||
compat | ||
crypto | ||
dist/pf | ||
distrib | ||
doc | ||
etc | ||
external | ||
extsrc | ||
games | ||
gnu | ||
include | ||
lib | ||
libexec | ||
regress | ||
rescue | ||
sbin | ||
share | ||
sys | ||
tests | ||
tools | ||
usr.bin | ||
usr.sbin | ||
build.sh | ||
BUILDING | ||
Makefile | ||
Makefile.inc | ||
UPDATING |