From: Steve Dickson <SteveD@redhat.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFSv4: Memory not being freed on memory allocation failure
Date: Wed, 26 Mar 2014 13:48:56 -0400 [thread overview]
Message-ID: <53331308.2000403@RedHat.com> (raw)
In-Reply-To: <22F1169D-33AA-4B8F-ADE0-E8BEEE97E361@primarydata.com>
On 03/26/2014 01:25 PM, Trond Myklebust wrote:
>
> On Mar 26, 2014, at 8:50, Steve Dickson <steved@redhat.com> wrote:
>
>> nfs4_run_open_task() puts a ref count on the nfs4_opendata
>> data pointer, then tries to allocate the task pointer.
>> If that task allocation fails nfs4_run_open_task() returns
>> leaving the ref count on the data pointer.
>>
>
> Hi Steve,
>
> That should not be the case. rpc_run_task() will always call nfs4_open_release() even if it returns an error.
How can rpc_run_task() run without a task pointer? and I think
you need a task allocated pointer to even call nfs4_open_release()
Here is what I'm seeing:
If rpc_alloc_task() fails, rpc_new_task() returns ERR_PTR(-ENOMEM)
In rpc_run_task() we do
task = rpc_new_task(task_setup_data);
if (IS_ERR(task))
goto out;
:
:
:
out:
return task;
In nfs4_run_open_task() we do
kref_get(&data->kref);
:
:
:
task = rpc_run_task(&task_setup_data)
If (IS_ERR(task))
return PTR_ERR(task);
What am I missing?
steved.
next prev parent reply other threads:[~2014-03-26 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 15:50 [PATCH] NFSv4: Memory not being freed on memory allocation failure Steve Dickson
2014-03-26 17:25 ` Trond Myklebust
2014-03-26 17:48 ` Steve Dickson [this message]
2014-03-26 18:39 ` Trond Myklebust
2014-03-26 19:11 ` Steve Dickson
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=53331308.2000403@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.