login
Header Space

 
 

Re: Oops in NFSv4 server in 2.6.23.17

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Lukas Hejtmanek <xhejtman@...>
Cc: <nfsv4@...>, <linux-kernel@...>, Neil Brown <neilb@...>
Date: Friday, March 14, 2008 - 4:05 pm

On Fri, Mar 14, 2008 at 08:53:03PM +0100, Lukas Hejtmanek wrote:

Right before the first nfsd_setuser_and_check_port()?  I don't believe
so.

The way it works is: the rqst_exp_find() calls bump the reference count
on the export they return to us, as expected; so if we bail out after
that line 185, the exp_put() at "out:" drops that reference, as it
should, making fh_verify a no-op with respect to the reference count.

The only time we need a new reference is when we store that pointer in
the filehandle, around line 233, as that's what creates a long-lived
reference that will outlive the function.

The other cache_get() (in the "just rechecking" case) is there just to
balance out the final exp_put() so every code path can share the same
code at "out:".

I find that a little contorted.  So I'll go ahead and submit this small
patch to 2.6.25 and stable now (I have since managed to reproduce what I
believe is your bug, though my symptoms were a little different), and
then submit to 2.6.26 some cleanup which makes this more understandable,
and brings fh_verify() a little closer to the kernel's aesthetic of
small, minimally-indented functions.

That said, I'd definitely still appreciate your confirmation that this
fixes your bug, so thanks for offering to retest that Monday.

--b.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Oops in NFSv4 server in 2.6.23.17, Lukas Hejtmanek, (Wed Mar 12, 8:25 am)
Re: Oops in NFSv4 server in 2.6.23.17, J. Bruce Fields, (Wed Mar 12, 12:00 pm)
Re: Oops in NFSv4 server in 2.6.23.17, Lukas Hejtmanek, (Thu Mar 13, 10:36 am)
Re: Oops in NFSv4 server in 2.6.23.17, J. Bruce Fields, (Fri Mar 14, 2:14 pm)
Re: Oops in NFSv4 server in 2.6.23.17, J. Bruce Fields, (Fri Mar 14, 3:33 pm)
Re: Oops in NFSv4 server in 2.6.23.17, Lukas Hejtmanek, (Fri Mar 14, 3:53 pm)
Re: Oops in NFSv4 server in 2.6.23.17, J. Bruce Fields, (Fri Mar 14, 4:05 pm)
Re: Oops in NFSv4 server in 2.6.23.17, Lukas Hejtmanek, (Mon Mar 17, 4:12 am)
Re: Oops in NFSv4 server in 2.6.23.17, J. Bruce Fields, (Mon Mar 17, 9:15 am)
Re: Oops in NFSv4 server in 2.6.23.17, J. Bruce Fields, (Fri Mar 14, 7:42 pm)
[PATCH] nfsd: fix oops on access from high-numbered ports, J. Bruce Fields, (Fri Mar 14, 7:37 pm)
speck-geostationary