[linux-cifs-client] Re: [Fwd: latest patches...]
Jeff Layton
jlayton at redhat.com
Wed Jan 2 14:00:31 GMT 2008
On Mon, 31 Dec 2007 10:48:01 -0500
Jeff Layton <jlayton at redhat.com> wrote:
> On Sun, 30 Dec 2007 22:00:18 -0600
> "Steve French" <smfrench at gmail.com> wrote:
>
> > Jeff,
> > On patch 3, I was questioning whether cifs_setup_session could be
> > racing with another thread since the check for session disconnected
> > is outside of the down(sesSesm) (which is held in the reconnect
> > code in cifssmb.c)
> >
> > Probably fine though - have checked this in and patch 4 and patch 2
> > (so far). On patch 2, I am wondering whether we need the same kind
> > of fix for NTLMv2 though - the code in sess.c around line 490 looks
> > wrong (see below):
> >
>
> Thanks. I wasn't sure whether the state was really protected by the
> sesSem, but if it is then we should probably hold it when testing it.
> I'll roll up and test a patch to make sure we hold the sem when
> testing the var when I get some time. You're probably right that it's
> an unlikely race, but those can be the most maddening to catch
> sometimes ;-)
>
Here's a patch to fix up the earlier patch. This makes it so that we
hold the sesSem when checking the status of the existing connection. We
might as well go ahead and patch up this potential race now than wait
until someone hits it.
--
Jeff Layton <jlayton at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-CIFS-hold-sesSem-when-checking-status-of-existing.patch
Type: text/x-patch
Size: 1321 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20080102/2c65648a/0001-CIFS-hold-sesSem-when-checking-status-of-existing.bin
More information about the linux-cifs-client
mailing list