public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Wise <swise@opengridcomputing.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: tom@opengridcomputing.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2.6.30] svcrdma: clean up error paths.
Date: Wed, 13 May 2009 17:42:23 -0500	[thread overview]
Message-ID: <4A0B4CCF.4090506@opengridcomputing.com> (raw)
In-Reply-To: <20090503184223.GB20762@fieldses.org>

Hey Bruce,

J. Bruce Fields wrote:
> On Wed, Apr 29, 2009 at 02:14:00PM -0500, Steve Wise wrote:
>   
>> These fixes resolved crashes due to resource leak BUG_ON checks. The
>> resource leaks were detected by introducing asynchronous transport errors.
>>     
>
> Thanks, applied for 2.6.30.  (And also appropriate for stable (2.6.29),
> I assume?)
>
> But, could someone take a closer look at the error paths here?  Questions:
>
> 	- svc_rdma_post_recv() does a svc_rdma_put_context() on error--
> 	  are you sure its caller needs to as well?
>   

The svc_rdma_put_context() call inside svc_rdma_post_recv() is for the 
recv context that was allocated inside that function.  The caller, in 
this case send_reply() also does a svc_rdma_put_context(), but that is 
for the send context.   So I think this is correct.


> 	- In send_reply, some of the cleanout is shared between the
> 	  first return -ENOTCONN and the final err: cleanup.  Could we
> 	  add another err: label and share some of that cleanup?
>   

The only common logic I see is the svc_rdma_put_context() call that 
could be shared.  But one case calls it with free_pages == 1 after the 
pages have been mapped, and the other with 0 since no pages are mapped 
at that point (when the call to svc_rdma_post_recv() fails).   So I'm 
not sure its worth doing?

 
Steve.

  reply	other threads:[~2009-05-13 22:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-29 19:14 [PATCH 2.6.30] svcrdma: clean up error paths Steve Wise
     [not found] ` <20090429191400.29365.36715.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2009-05-03 18:42   ` J. Bruce Fields
2009-05-13 22:42     ` Steve Wise [this message]
2009-05-14 21:17       ` J. Bruce Fields

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=4A0B4CCF.4090506@opengridcomputing.com \
    --to=swise@opengridcomputing.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tom@opengridcomputing.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