mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] cifs: fix oopses and mem corruption with concurrent mount/umount (try #3)
@ 2008-10-22 14:13 Jeff Layton
  2008-10-22 14:13 ` [PATCH 1/4] cifs: clean up server protocol handling for TCP_Server_Info Jeff Layton
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jeff Layton @ 2008-10-22 14:13 UTC (permalink / raw)
  To: smfrench; +Cc: linux-cifs-client, linux-kernel, smfrench

This patchset is intended to fix the oopses, memory corruption and mount
failures when using the reproducer detailed here:

https://bugzilla.samba.org/show_bug.cgi?id=5720

This is the third attempt at this. Since the second attempt, Steve has
committed the patch to remove kthread_stop from the cifsd shutdown
codepath. That will fix the deadlocks, but opens the window wider for
the oopses and memory corruption in this code. 

The main difference in the remaining patches is that this set combines
the patches that disable the structure sharing with the one that
re-enables the TCP session sharing. It also adds a new patch that
re-enables the sharing of SMB sessions. With this set, only tree
connections are no longer shared.

With this, I've been able to run the reproducer in the above BZ for
several hours, whereas before it would regularly crash after just a few
minutes.

Jeff Layton (4):
  cifs: clean up server protocol handling for TCP_Server_Info
  cifs: handle the TCP_Server_Info->tsk field more carefully
  cifs: disable sharing session and tcon and add new TCP sharing code
  cifs: reinstate sharing of SMB sessions

 fs/cifs/cifs_debug.c |   54 ++++----
 fs/cifs/cifsfs.c     |   25 +++--
 fs/cifs/cifsglob.h   |   20 +--
 fs/cifs/cifssmb.c    |   20 +---
 fs/cifs/connect.c    |  354 +++++++++++++++++++++++---------------------------
 fs/cifs/misc.c       |   15 +--
 6 files changed, 223 insertions(+), 265 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/4] cifs: fix oopses and mem corruption with concurrent mount/umount (try #4)
@ 2008-10-30 15:16 Jeff Layton
  2008-10-30 15:16 ` [PATCH 1/4] cifs: clean up server protocol handling for TCP_Server_Info Jeff Layton
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Layton @ 2008-10-30 15:16 UTC (permalink / raw)
  To: smfrench; +Cc: smfrench, linux-cifs-client, linux-kernel

This patchset is intended to fix the oopses, memory corruption and mount
failures when using the reproducer detailed here:

https://bugzilla.samba.org/show_bug.cgi?id=5720

This is the fourth attempt at this. Since the third attempt, Steve
French has committed the patch to handle the server->tsk pointer more
atomically so that patch is ommitted here. While that patch helps ensure
that the shutdown of the demux thread happens cleanly, there are still
other races.

Andrew Morton has also taken the patch to clean up the server protocol
handling for -mm. I've included this patch in the set since Steve has
not yet taken it, and I've had to modify it slightly for changes that
have gone into Steve's tree.

This patchset is based on Steve French's cifs-2.6 git tree and should
apply cleanly to its current state.

The main differences in this patchset are that it fixes some bugs in
list handling in the earlier patchsets. It also reenables the sharing
of tree connects. With this, any structures that were previously
shared should remain so (no loss of functionality).

There's still some remaining cleanup work that can be done here. The
cifs_mount code could stand to be broken up into smaller functions.
cifs_debug_data_proc_show could also stand to be reorganized to better
reflect the heirarchy of server->session->tcon. Those changes are
probably more suitable in follow-on patches. I'd like to know whether
these are acceptible before I spend time working on them.

I've been able to run the reproducer in the above BZ overnight on this
patchset. Without it, it usually crashes within a few minutes.

Jeff Layton (4):
  cifs: clean up server protocol handling for TCP_Server_Info
  cifs: disable sharing session and tcon and add new TCP sharing code
  cifs: reinstate sharing of SMB sessions
  cifs: reinstate sharing of tree connections

 fs/cifs/cifs_debug.c |  286 +++++++++++++++++++---------------
 fs/cifs/cifsfs.c     |   33 +++--
 fs/cifs/cifsglob.h   |   28 ++--
 fs/cifs/cifssmb.c    |   54 +------
 fs/cifs/connect.c    |  426 +++++++++++++++++++++++++-------------------------
 fs/cifs/misc.c       |   93 +++++------
 6 files changed, 456 insertions(+), 464 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-30 15:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22 14:13 [PATCH 0/4] cifs: fix oopses and mem corruption with concurrent mount/umount (try #3) Jeff Layton
2008-10-22 14:13 ` [PATCH 1/4] cifs: clean up server protocol handling for TCP_Server_Info Jeff Layton
2008-10-22 14:13 ` [PATCH 2/4] cifs: handle the TCP_Server_Info->tsk field more carefully Jeff Layton
2008-10-22 14:14 ` [PATCH 3/4] cifs: disable sharing session and tcon and add new TCP sharing code Jeff Layton
2008-10-22 14:14 ` [PATCH 4/4] cifs: reinstate sharing of SMB sessions Jeff Layton
2008-10-30 15:16 [PATCH 0/4] cifs: fix oopses and mem corruption with concurrent mount/umount (try #4) Jeff Layton
2008-10-30 15:16 ` [PATCH 1/4] cifs: clean up server protocol handling for TCP_Server_Info Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®