summaryrefslogtreecommitdiffstats
path: root/fs/cifs/netmisc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-03 18:00:49 +0200
committerSteve French <sfrench@us.ibm.com>2010-09-08 23:22:33 +0200
commit7332f2a6217ee6925f83ef0e725013067ed316ba (patch)
tree481c0774aa1620f9e3f20e2809307d9047dd7324 /fs/cifs/netmisc.c
parentcifs: prevent cifsd from exiting prematurely (diff)
downloadlinux-7332f2a6217ee6925f83ef0e725013067ed316ba.tar.xz
linux-7332f2a6217ee6925f83ef0e725013067ed316ba.zip
cifs: eliminate some more premature cifsd exits
If the tcpStatus is still CifsNew, the main cifs_demultiplex_loop can break out prematurely in some cases. This is wrong as we will almost always have other structures with pointers to the TCP_Server_Info. If the main loop breaks under any other condition other than tcpStatus == CifsExiting, then it'll face a use-after-free situation. I don't see any reason to treat a CifsNew tcpStatus differently than CifsGood. I believe we'll still want to attempt to reconnect in either case. What should happen in those situations is that the MIDs get marked as MID_RETRY_NEEDED. This will make CIFSSMBNegotiate return -EAGAIN, and then the caller can retry the whole thing on a newly reconnected socket. If that fails again in the same way, the caller of cifs_get_smb_ses should tear down the TCP_Server_Info struct. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/netmisc.c')
0 files changed, 0 insertions, 0 deletions