cifs: check MaxPathNameComponentLength != 0 before using it smb3-file-name-too-long-fix
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 30 Oct 2017 02:28:03 +0000 (13:28 +1100)
committerSteve French <smfrench@gmail.com>
Mon, 30 Oct 2017 07:11:38 +0000 (02:11 -0500)
commitf74bc7c6679200a4a83156bb89cbf6c229fe8ec0
treec9a48a5f95603591edbeb175ef6bd8776a8df7a5
parent0b07194bb55ed836c2cc7c22e866b87a14681984
cifs: check MaxPathNameComponentLength != 0 before using it

And fix tcon leak in error path.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
fs/cifs/dir.c