summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/xhci.c
diff options
context:
space:
mode:
authoranton <anton@openbsd.org>2020-06-29 18:23:18 +0000
committeranton <anton@openbsd.org>2020-06-29 18:23:18 +0000
commit42294cbdac5877eca3578f20cfd59747ec540b38 (patch)
tree31e7d170239be027140da42587cd7f25e3306178 /sys/dev/usb/xhci.c
parententer arch/powerpc64 (diff)
downloadwireguard-openbsd-42294cbdac5877eca3578f20cfd59747ec540b38.tar.xz
wireguard-openbsd-42294cbdac5877eca3578f20cfd59747ec540b38.zip
Bring back revision 1.122 with a fix preventing a use-after-free by
serializing calls to pipe_buffer_free(). Repeating the previous commit message: Instead of performing three distinct allocations per created pipe, reduce it to a single one. Not only should this be more performant, it also solves a kqueue related issue found by visa@ who also requested this change: if you attach an EVFILT_WRITE filter to a pipe fd, the knote gets added to the peer's klist. This is a problem for kqueue because if you close the peer's fd, the knote is left in the list whose head is about to be freed. knote_fdclose() is not able to clear the knote because it is not registered with the peer's fd. FreeBSD also takes a similar approach to pipe allocations. once again ok mpi@ visa@
Diffstat (limited to 'sys/dev/usb/xhci.c')
0 files changed, 0 insertions, 0 deletions