From: "Steve French" <smfrench@gmail.com>
To: "Jeff Layton" <jlayton@redhat.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: problem with kthread changes that went into cifs_demultiplex_thread
Date: Tue, 10 Jun 2008 10:41:29 -0500 [thread overview]
Message-ID: <524f69650806100841r4f90bd0k342c3264c8c64362@mail.gmail.com> (raw)
In working on the smb2 client implementation, I noticed that there is
a problem with the revised kthread logic which takes down cifsd
(cifs_demultiplex_thread) on umount or on abnormal socket termination
during protocol negotiation. I noticed this while looking at SMB2
since the Samba 4 SMB2 server was not handling the new SMB2 Negotiate
protocol request (and unlike Windows Server 2008) and was closing the
tcp session immediately after receiving the negprot request from the
client. An unexpected error on negprot which causes the TCP session
to close will cause cifsd to exit, but now this blocks forever at
kthread_should_stop just after the main loop in
cifs_demultiplex_thread. The task doing mount is blocked in
wait_event on the response_q but will never be woken up by cifsd (even
though it would timeout if some one did wake it up once the 15 second
timeout was expired). umount will never call kthread_stop because
mount never succeeded - we do not have a tree connection yet (so tcon
is null and we can't get to tcon->ses->server) and the failed mount
won't call kthread_stop because it is stuck in wait_event with no one
to wake up response_q.
Adding a call to wake_up_all(&server->response_q) right after we set
server->tcpStatus = CifsExiting at the end of the loop in
cifs_demultiplex_thread but before we wait for kthread_stop works in
my testing.
--
Thanks,
Steve
next reply other threads:[~2008-06-10 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 15:41 Steve French [this message]
2008-06-10 17:24 ` problem with kthread changes that went into cifs_demultiplex_thread Jeff Layton
2008-06-10 21:40 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=524f69650806100841r4f90bd0k342c3264c8c64362@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).