summaryrefslogtreecommitdiffstats
path: root/fs/cifs/README
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-03 12:00:49 -0400
committerSteve French <sfrench@us.ibm.com>2010-09-08 21:22:30 +0000
commit522bbe65a2415fabce618186fc7777eb4c502989 (patch)
tree6eb66dac2892728d93e3220511c0ec7e35f40ce4 /fs/cifs/README
parent4266d9118f85b050a341992f0cfab40d392ef32c (diff)
downloadop-kernel-dev-522bbe65a2415fabce618186fc7777eb4c502989.zip
op-kernel-dev-522bbe65a2415fabce618186fc7777eb4c502989.tar.gz
cifs: prevent cifsd from exiting prematurely
When cifs_demultiplex_thread exits, it does a number of cleanup tasks including freeing the TCP_Server_Info struct. Much of the existing code in cifs assumes that when there is a cisfSesInfo struct, that it holds a reference to a valid TCP_Server_Info struct. We can never allow cifsd to exit when a cifsSesInfo struct is still holding a reference to the server. The server pointers will then point to freed memory. This patch eliminates a couple of questionable conditions where it does this. The idea here is to make an -EINTR return from kernel_recvmsg behave the same way as -ERESTARTSYS or -EAGAIN. If the task was signalled from cifs_put_tcp_session, then tcpStatus will be CifsExiting, and the kernel_recvmsg call will return quickly. There's also another condition where this can occur too -- if the tcpStatus is still in CifsNew, then it will also exit if the server closes the socket prematurely. I think we'll probably also need to fix that situation, but that requires a bit more consideration. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/README')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud