[lkml]   [2002]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] 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

    diff -urdN linux/fs/locks.c linux/fs/locks.c
    --- linux/fs/locks.c 2002-09-13 21:49:17.000000000 +0200
    +++ linux/fs/locks.c 2002-09-14 11:19:37.000000000 +0200
    @@ -1588,7 +1588,7 @@

    for (;;) {
    error = posix_lock_file(filp, file_lock);
    - if ((error != -EAGAIN) || (cmd == F_SETLK))
    + if ((error != -EAGAIN) || (cmd == F_SETLK64))
    error = wait_event_interruptible(file_lock->fl_wait,
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2005-03-22 13:28    [W:0.022 / U:2.472 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site