cifs: check MaxPathNameComponentLength != 0 before using it
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 30 Oct 2017 02:28:03 +0000 (13:28 +1100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:38 +0000 (13:34 +0000)
commit90d8668e4ac34a84c52dc5b078af9d982323502c
tree2b01544ce7390a96261e4dc59a36631454a814f0
parent47dcfde4a9cc9f0e2dbe3fab9d8fc10ad42f1c00
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>
[bwh: Backported to 3.2: cifs_tcon pointer is tcon, and there's no leak to fix]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/cifs/dir.c