• P
    CIFS: Fix possible hang during async MTU reads and writes · 2f29b095
    Pavel Shilovsky 提交于
    commit acc58d0bab55a50e02c25f00bd6a210ee121595f upstream.
    
    When doing MTU i/o we need to leave some credits for
    possible reopen requests and other operations happening
    in parallel. Currently we leave 1 credit which is not
    enough even for reopen only: we need at least 2 credits
    if durable handle reconnect fails. Also there may be
    other operations at the same time including compounding
    ones which require 3 credits at a time each. Fix this
    by leaving 8 credits which is big enough to cover most
    scenarios.
    
    Was able to reproduce this when server was configured
    to give out fewer credits than usual.
    
    The proper fix would be to reconnect a file handle first
    and then obtain credits for an MTU request but this leads
    to bigger code changes and should happen in other patches.
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: NPavel Shilovsky <pshilov@microsoft.com>
    Signed-off-by: NSteve French <stfrench@microsoft.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    2f29b095
smb2ops.c 104.5 KB