2.5.34-bk fcntl lockup
Subsystems (2)
PATCH 1/1 2.5.34-bk fcntl lockup
Hi Linus,
please apply this.
Fixes endless loop without schedule which happens as soon as smbd invokes fcntl64(7, F_SETLK64, ...). fcntl_setlk64 gets cmd F_SETLK64, not F_SETLK tested in the loop;
Maybe return value from posix_lock_file should be changed to -EINPROGRESS or -EJUKEBOX instead of testing passed cmd in callers, but this oneliner works too. If you preffer changing posix_lock_file return value to clearly distinugish between -EAGAIN and lock request queued, I'll do that.
Best regards,
Petr Vandrovec [email protected]
fs/locks.c +1 -1
@@ -1588,7 +1588,7 @@for (;;) { error =posix_lock_file (filp, file_lock); -if ((error != -EAGAIN ) || (cmd ==F_SETLK )) +if ((error != -EAGAIN ) || (cmd ==F_SETLK64 ))break ; error =wait_event_interruptible (file_lock->fl_wait, !file_lock->fl_next);
Quoted 2 lines · Petr Vandrovec
Hi Linus,
please apply this.
agreed, please apply.
Quoted 3 lines
Fixes endless loop without schedule which happens as soon as smbd invokes
fcntl64(7, F_SETLK64, ...).fcntl_setlk64gets cmdF_SETLK64, notF_SETLKtested in the loop;
i guess the LTP testsuite isn't quite comprehensive enough yet, it should have caught this.
Quoted 4 lines
Maybe return value from
posix_lock_fileshould be changed to-EINPROGRESSor-EJUKEBOXinstead of testing passed cmd in callers, but this oneliner works too. If you preffer changingposix_lock_filereturn value to clearly distinugish between-EAGAINand lock request queued, I'll do that.
i'll look at that idea, hadn't occurred to me before.
Signature · 1 line
Revolutions do not require corporate support.