cifs: handle errors from coalesce_t2
commitef65b13bc0be7792c8982264209d782f8ee1dd3c
authorJeff Layton <jlayton@redhat.com>
Fri, 29 Apr 2011 10:52:44 +0000 (29 06:52 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 May 2011 22:13:03 +0000 (21 15:13 -0700)
treef4d0e00e1d1cde3fe292771bf20f5f7d5648ea4b
parent8004af443bb5537018555febbc93de467461abf6
cifs: handle errors from coalesce_t2

commit 16541ba11c4f04ffe94b073e301f00b749fb84a1 upstream.

cifs_demultiplex_thread calls coalesce_t2 to try and merge follow-on t2
responses into the original mid buffer. coalesce_t2 however can return
errors, but the caller doesn't handle that situation properly. Fix the
thread to treat such a case as it would a malformed packet. Mark the
mid as being malformed and issue the callback.

Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/connect.c