]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Allocate crypto structures on the fly for calculating signatures of incoming...
authorLong Li <longli@microsoft.com>
Tue, 31 Mar 2020 23:21:43 +0000 (16:21 -0700)
committerSteve French <stfrench@microsoft.com>
Tue, 7 Apr 2020 17:41:16 +0000 (12:41 -0500)
commite786023854e167064eaaf557578fa6290944a13f
treedc8347065b8ef15630328e370a01940294c2b010
parent184adbed4a4d9934a8116697583db894dfff4629
cifs: Allocate crypto structures on the fly for calculating signatures of incoming packets

CIFS uses pre-allocated crypto structures to calculate signatures for both
incoming and outgoing packets. In this way it doesn't need to allocate crypto
structures for every packet, but it requires a lock to prevent concurrent
access to crypto structures.

Remove the lock by allocating crypto structures on the fly for
incoming packets. At the same time, we can still use pre-allocated crypto
structures for outgoing packets, as they are already protected by transport
lock srv_mutex.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/smb2proto.h
fs/cifs/smb2transport.c