• Jeff Layton's avatar
    cifs: wrap received signature check in srv_mutex · 157c2491
    Jeff Layton authored
    While testing my patchset to fix asynchronous writes, I hit a bunch
    of signature problems when testing with signing on. The problem seems
    to be that signature checks on receive can be running at the same
    time as a process that is sending, or even that multiple receives can
    be checking signatures at the same time, clobbering the same data
    structures.
    
    While we're at it, clean up the comments over cifs_calculate_signature
    and add a note that the srv_mutex should be held when calling this
    function.
    
    This patch seems to fix the problems for me, but I'm not clear on
    whether it's the best approach. If it is, then this should probably
    go to stable too.
    
    Cc: stable@kernel.org
    Cc: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
    157c2491
cifsencrypt.c 21.6 KB