Date: Fri, 04 Jul 2014 22:41:20 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191593] [fcntl] F_SETLK returns EDEADLK when it shouldn't - only F_SETLKW and waiting should return EDEADLK Message-ID: <bug-191593-8-oAAd95lW9H@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-191593-8@https.bugs.freebsd.org/bugzilla/> References: <bug-191593-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191593 Jilles Tjoelker <jilles@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jilles@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@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 deadlock. 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191593-8-oAAd95lW9H>