summaryrefslogtreecommitdiffstats
path: root/sys/geom/linux_lvm/g_linux_lvm.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-12-09 20:28:30 +0000
committerjhb <jhb@FreeBSD.org>2010-12-09 20:28:30 +0000
commitc3ffedd66b60efcf18ea15901fee16f8cbd58649 (patch)
treec7298cc52d28696c6859135fd5289360e37cf1f7 /sys/geom/linux_lvm/g_linux_lvm.c
parenteca7cac32fe13112feffae89181f0f88bb72b7ee (diff)
downloadFreeBSD-src-c3ffedd66b60efcf18ea15901fee16f8cbd58649.zip
FreeBSD-src-c3ffedd66b60efcf18ea15901fee16f8cbd58649.tar.gz
When reopening a stream backed by an open file descriptor, do not close
the existing file descriptor. Instead, let dup2() atomically close the old file descriptor when assigning the newly opened file to the same descriptor. This closes a race in a multithreaded application where a concurrent open() could allocate the existing file descriptor in between the calls to close() and dup2(). PR: threads/79887 Submitted by: Dmitrij Tejblum tejblum of yandex-team.ru Reviewed by: davidxu MFC after: 1 week
Diffstat (limited to 'sys/geom/linux_lvm/g_linux_lvm.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud