aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-14 11:38:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-20 13:36:46 -0700
commit801c1aca52fb016a47c77c8e61df5e2f6da5c406 (patch)
tree21899fd789fc4a9c1218a3a068f358c6aabef653 /net
parent1a5029d51d4a82c05596b317be20a2c660f68853 (diff)
cifs: fix potential double put of TCP session reference
commit 460cf3411b858ad509d5255e0dfaf862a83c0299 upstream. cifs_get_smb_ses must be called on a server pointer on which it holds an active reference. It first does a search for an existing SMB session. If it finds one, it'll put the server reference and then try to ensure that the negprot is done, etc. If it encounters an error at that point then it'll return an error. There's a potential problem here though. When cifs_get_smb_ses returns an error, the caller will also put the TCP server reference leading to a double-put. Fix this by having cifs_get_smb_ses only put the server reference if it found an existing session that it could use and isn't returning an error. Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de> 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>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions