cifs: check MaxPathNameComponentLength != 0 before using it
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 30 Oct 2017 02:28:03 +0000 (13:28 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 09:08:31 +0000 (10:08 +0100)
commit5e8b028abaf85502c53fb3af795f3c61d7cbcdc8
tree37c9de28d2a31d077744c9a902d9b86c3be02194
parentffb76bb8aa9e18e97b40cd60f9cb0670cc1b8096
cifs: check MaxPathNameComponentLength != 0 before using it

commit f74bc7c6679200a4a83156bb89cbf6c229fe8ec0 upstream.

And fix tcon leak in error path.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/dir.c