]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: don't always drop malformed replies on the floor (try #3)
authorJeff Layton <jlayton@redhat.com>
Thu, 10 Feb 2011 13:03:50 +0000 (08:03 -0500)
committerSteve French <sfrench@us.ibm.com>
Fri, 11 Feb 2011 03:59:12 +0000 (03:59 +0000)
commitfc04d440a36a0f62f3f3e7e44c128355538f411b
tree2cc136ce754cc5c24ed8aefde5e486fc873ae139
parent8e4cfb1fdd96a1f01fc07528a6e462bdb55d9dc3
cifs: don't always drop malformed replies on the floor (try #3)

Slight revision to this patch...use min_t() instead of conditional
assignment. Also, remove the FIXME comment and replace it with the
explanation that Steve gave earlier.

After receiving a packet, we currently check the header. If it's no
good, then we toss it out and continue the loop, leaving the caller
waiting on that response.

In cases where the packet has length inconsistencies, but the MID is
valid, this leads to unneeded delays. That's especially problematic now
that the client waits indefinitely for responses.

Instead, don't immediately discard the packet if checkSMB fails. Try to
find a matching mid_q_entry, mark it as having a malformed response and
issue the callback.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsglob.h
fs/cifs/connect.c
fs/cifs/transport.c