From: Bob Liu <bob.liu@oracle.com>
To: Matthew Daley <mattd@bugfuzz.com>
Cc: xen-devel@lists.xenproject.org, xen-devel@lists.xen.org
Subject: Re: [PATCH] tmem: propagate ENOMEM result in error handling
Date: Mon, 31 Mar 2014 05:09:33 +0800 [thread overview]
Message-ID: <5338880D.50709@oracle.com> (raw)
In-Reply-To: <1396069649-5773-1-git-send-email-mattd@bugfuzz.com>
On 03/29/2014 01:07 PM, Matthew Daley wrote:
> ...otherwise if pcd_associate fails due to out-of-memory, the caller of
> do_tmem_put will think the call was successful.
>
Good catch! Thanks a lot!
> While at it, fix up the style issue.
>
> Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
> ---
> xen/common/tmem.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/tmem.c b/xen/common/tmem.c
> index 02e7e2e..9cebe11 100644
> --- a/xen/common/tmem.c
> +++ b/xen/common/tmem.c
> @@ -1646,8 +1646,11 @@ copy_uncompressed:
>
> if ( tmem_dedup_enabled() && !is_persistent(pool) )
> {
> - if ( pcd_associate(pgp,NULL,0) == -ENOMEM )
> + if ( pcd_associate(pgp, NULL, 0) == -ENOMEM )
> + {
> + ret = -ENOMEM;
> goto del_pgp_from_obj;
> + }
> }
>
> insert_page:
>
next prev parent reply other threads:[~2014-03-30 21:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 5:07 [PATCH] tmem: propagate ENOMEM result in error handling Matthew Daley
2014-03-30 21:09 ` Bob Liu [this message]
2014-04-03 18:04 ` Konrad Rzeszutek Wilk
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=5338880D.50709@oracle.com \
--to=bob.liu@oracle.com \
--cc=mattd@bugfuzz.com \
--cc=xen-devel@lists.xen.org \
--cc=xen-devel@lists.xenproject.org \
/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.