cifs: handle errors from coalesce_t2
authorJeff Layton <jlayton@redhat.com>
Fri, 29 Apr 2011 10:52:44 +0000 (06:52 -0400)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:19 +0000 (14:23 -0500)
commit3a64215fb515ea68e43ee84c3e375123b0135bf1
treed326d4283a12e491f6d070982ce0dd104784dd4d
parent6666d31267799d33626a746cf51594f77228ec39
cifs: handle errors from coalesce_t2

BugLink: http://bugs.launchpad.net/bugs/788691

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>
Signed-off-by: Steve Conklin <sconklin@canonical.com>
fs/cifs/connect.c