[Bug 191593] [fcntl] F_SETLK returns EDEADLK when it shouldn't - only F_SETLKW and waiting should return EDEADLK

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jul 4 22:41:20 UTC 2014


Jilles Tjoelker <jilles at FreeBSD.org> changed:

           What    |Removed                     |Added
                 CC|                            |jilles at FreeBSD.org
            Summary|[fcntl] F_SETLK returns     |[fcntl] F_SETLK returns
                   |EDEADLK when it shouldn't - |EDEADLK when it shouldn't -
                   |only F_SETFLW and waiting   |only F_SETLKW and waiting
                   |should return EDEADLK       |should return EDEADLK

--- Comment #3 from Jilles Tjoelker <jilles at FreeBSD.org> ---
You are right that fcntl(F_SETLK) should not fail with [EDEADLK]; this error is
only defined for fcntl(F_SETLKW). A non-blocking locking attempt cannot

The proposed patch looks wrong, though. The above if ((lock->lf_flags & F_WAIT)
== 0 && lock->lf_async_task == NULL) should already catch this case. Perhaps
lf_async_task is set incorrectly?

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list