lkml.org 
[lkml]   [2007]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[31/50] Correctly close old nfsd/lockd sockets.
    From: Neil Brown <neilb@suse.de>

    commit 7a1fa065a0264f6b3d3003ba5635289f6583c478 in mainline.

    Commit aaf68cfbf2241d24d46583423f6bff5c47e088b3 added a bias
    to sk_inuse, so this test for an unused socket now fails. So no
    sockets get closed because they are old (they might get closed
    if the client closed them).

    This bug has existed since 2.6.21-rc1.

    Thanks to Wolfgang Walter for finding and reporting the bug.

    Cc: Wolfgang Walter <wolfgang.walter@studentenwerk.mhn.de>
    Signed-off-by: Neil Brown <neilb@suse.de>
    Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    net/sunrpc/svcsock.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/net/sunrpc/svcsock.c
    +++ b/net/sunrpc/svcsock.c
    @@ -1573,7 +1573,8 @@ svc_age_temp_sockets(unsigned long closu

    if (!test_and_set_bit(SK_OLD, &svsk->sk_flags))
    continue;
    - if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags))
    + if (atomic_read(&svsk->sk_inuse) > 1
    + || test_bit(SK_BUSY, &svsk->sk_flags))
    continue;
    atomic_inc(&svsk->sk_inuse);
    list_move(le, &to_be_aged);
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-09-24 18:39    [W:0.019 / U:90.796 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site