• J
    nfsd: add a LRU list for blocked locks · 7919d0a2
    Jeff Layton 提交于
    It's possible for a client to call in on a lock that is blocked for a
    long time, but discontinue polling for it. A malicious client could
    even set a lock on a file, and then spam the server with failing lock
    requests from different lockowners that pile up in a DoS attack.
    
    Add the blocked lock structures to a per-net namespace LRU when hashing
    them, and timestamp them. If the lock request is not revisited after a
    lease period, we'll drop it under the assumption that the client is no
    longer interested.
    
    This also gives us a mechanism to clean up these objects at server
    shutdown time as well.
    Signed-off-by: NJeff Layton <jlayton@redhat.com>
    Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
    7919d0a2
state.h 22.5 KB