cifs: stop cifsd from exiting prematurely
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | cifs: prevent cifsd from exiting prematurelyfs/ | +7 | 0 replies | |
| 2/3 | cifs: eliminate some more premature cifsd exitsfs/ | +12 | 0 replies | |
| 3/3 | cifs: prevent possible memory corruption in cifs_demultiplex_threadfs/ fs/ fs/ | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] cifs: stop cifsd from exiting prematurely
We've had some sporradic reports of problems recently where the ses->server pointers have been NULL. That pointer should only get set to NULL when cifs_demultiplex_thread exits. That should only happen when the last reference to it is put. If it gets cleaned up before then, other structures will hold pointers to it, and we'll get NULL pointer dereferences.
Unfortunately, there are some places in cifs_demuliplex_thread where this rule is broken. In certain error conditions, cifsd will exit even though the reference count hasn't gone to zero yet. This patchset is intended to close these holes. With it, cifsd should only exit when the last reference to it is put.
Exiting from the loop early is a serious error that's likely to cause an oops. I think we ought to consider this patchset for 2.6.36 and maybe for stable.
Thoughts?
Jeff Layton (3):
cifs: prevent cifsd from exiting prematurely
cifs: eliminate some more premature cifsd exits
cifs: prevent possible memory corruption in cifs_demultiplex_thread
fs/cifs/cifsproto.h | 3 +- fs/cifs/connect.c | 58 +++++++++++++++++--------------------------------- fs/cifs/netmisc.c | 22 +++++++++++-------- 3 files changed, 35 insertions(+), 48 deletions(-)