]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: don't send an echo request unless NegProt has been done
authorJeff Layton <jlayton@redhat.com>
Fri, 4 Feb 2011 22:09:50 +0000 (17:09 -0500)
committerSteve French <sfrench@us.ibm.com>
Sat, 5 Feb 2011 03:02:14 +0000 (03:02 +0000)
commit385288e0c651c3a91f60377f1fa4b0459527275f
treeee689aa2ee2e0e38eebc9b44472270689bace088
parent8e93b74df6e0d40894314b946c1297ba89fe7257
cifs: don't send an echo request unless NegProt has been done

When the socket to the server is disconnected, the client more or less
immediately calls cifs_reconnect to reconnect the socket. The NegProt
and SessSetup however are not done until an actual call needs to be
made.

With the addition of the SMB echo code, it's possible that the server
will initiate a disconnect on an idle socket. The client will then
reconnect the socket but no NegotiateProtocol request is done. The
SMBEcho workqueue job will then eventually pop, and an SMBEcho will be
sent on the socket. The server will then reject it since no NegProt was
done.

The ideal fix would be to either have the socket not be reconnected
until we plan to use it, or to immediately do a NegProt when the
reconnect occurs. The code is not structured for this however. For now
we must just settle for not sending any echoes until the NegProt is
done.

Reported-by: JG <jg@cms.ac>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c