diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-11-05 20:31:36 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-11-05 20:31:36 +0300 |
commit | 41299df081a0a7edc646caf84d208145624a1d37 (patch) | |
tree | f2e7f07b5b2ea37fc42cbbef99636f6b84aabeb4 /winsup/cygwin/flock.cc | |
parent | eeef72702692fca52610634da32b56241e8083f3 (diff) |
Avoid deadlock in flock(2)
* fcntl.cc (fcntl64): Don't lock fd table when performing locking.
* flock.cc (flock): Ditto.
(lockf): Ditto.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/flock.cc')
-rw-r--r-- | winsup/cygwin/flock.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc index f26a76a74..0ac55485b 100644 --- a/winsup/cygwin/flock.cc +++ b/winsup/cygwin/flock.cc @@ -1,6 +1,6 @@ /* flock.cc. NT specific implementation of advisory file locking. - Copyright 2003, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc. + Copyright 2003, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc. This file is part of Cygwin. @@ -1773,7 +1773,7 @@ flock (int fd, int operation) __try { - cygheap_fdget cfd (fd, true); + cygheap_fdget cfd (fd); if (cfd < 0) __leave; @@ -1817,7 +1817,7 @@ lockf (int filedes, int function, off_t size) __try { - cygheap_fdget cfd (filedes, true); + cygheap_fdget cfd (filedes); if (cfd < 0) __leave; |