mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: smfrench@gmail.com
Cc: smfrench@austin.rr.com, linux-cifs-client@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] cifs: fix oopses and mem corruption with concurrent mount/umount (try #5)
Date: Sat,  8 Nov 2008 09:14:11 -0500	[thread overview]
Message-ID: <1226153656-7741-1-git-send-email-jlayton@redhat.com> (raw)

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 fifth attempt at this. Since the fourth attempt, I've
changed the socket handling cleanup patch to also fix some problems with
IPv6 mounts, and have added a patch to change the tcon->tidStatus from
an enum to a bitfield.

The other main difference is that I've moved from the more granular
locking scheme in the earlier patches to one where all of the new lists
and refcounts are protected by the cifs_tcp_session_lock. That lock has
also been converted to a r/w spinlock.

The patch is a little larger than it really needs to be simply because
I've also taken this opportunity to move areas of the code that I was
touching to more closely resemble standard kernel coding style. There
are still style problems with it -- several lines are over 80 chars.
Fixing them will mean restructuring the code further however, and there
are already concerns about the size of this patchset. I've decided to
draw the line here...

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

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. It also needs to be
updated to handle IPv6 addresses correctly. Those changes are probably
more suitable in follow-on patches. I'd like to see these go in 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 (5):
  cifs: clean up server protocol handling for TCP_Server_Info
  cifs: convert tcon->tidStatus to a bitfield
  cifs: disable sharing session and tcon and add new TCP sharing code
  cifs: reinstate sharing of SMB sessions sans races
  cifs: reinstate sharing of tree connections

 fs/cifs/cifs_debug.c  |  277 +++++++++++++++++--------------
 fs/cifs/cifs_spnego.c |    4 +-
 fs/cifs/cifsfs.c      |   37 +++--
 fs/cifs/cifsglob.h    |   33 ++--
 fs/cifs/cifssmb.c     |   68 ++------
 fs/cifs/connect.c     |  439 ++++++++++++++++++++++++-------------------------
 fs/cifs/file.c        |    2 +-
 fs/cifs/misc.c        |   89 +++++------
 8 files changed, 464 insertions(+), 485 deletions(-)


             reply	other threads:[~2008-11-08 14:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-08 14:14 Jeff Layton [this message]
2008-11-08 14:14 ` [PATCH 1/5] cifs: clean up server protocol handling Jeff Layton
2008-11-08 14:14 ` [PATCH 2/5] cifs: convert tcon->tidStatus to a bitfield Jeff Layton
2008-11-08 14:14 ` [PATCH 3/5] cifs: disable sharing session and tcon and add new TCP sharing code Jeff Layton
2008-11-08 14:14 ` [PATCH 4/5] cifs: reinstate sharing of SMB sessions sans races Jeff Layton
2008-11-08 14:14 ` [PATCH 5/5] cifs: reinstate sharing of tree connections Jeff Layton

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=1226153656-7741-1-git-send-email-jlayton@redhat.com \
    --to=jlayton@redhat.com \
    --cc=linux-cifs-client@lists.samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smfrench@austin.rr.com \
    --cc=smfrench@gmail.com \
    /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

all inboxes | Powered by JetHome®