CIFS: Fix too big maxBuf size for SMB3 mounts
authorPavel Shilovsky <piastry@etersoft.ru>
Fri, 14 Feb 2014 09:31:02 +0000 (13:31 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 05:30:02 +0000 (21:30 -0800)
commit32c36d8888008fb30c8215d0fc189a288285bc12
treea90b72e03ed685764fdedf41fb4c90847dfbb776
parent9f0afafeb7bdd6c2c2b27a93c803fff975a232be
CIFS: Fix too big maxBuf size for SMB3 mounts

commit 2365c4eaf077c48574ab6f143960048fc0f31518 upstream.

SMB3 servers can respond with MaxTransactSize of more than 4M
that can cause a memory allocation error returned from kmalloc
in a lock codepath. Also the client doesn't support multicredit
requests now and allows buffer sizes of 65536 bytes only. Set
MaxTransactSize to this maximum supported value.

Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2glob.h
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c