All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: Bob Liu <bob.liu@oracle.com>
Cc: xen-devel@lists.xenproject.org, Matthew Daley <mattd@bugfuzz.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] tmem: propagate ENOMEM result in error handling
Date: Thu, 3 Apr 2014 14:04:43 -0400	[thread overview]
Message-ID: <20140403180441.GA24597@andromeda.dapyr.net> (raw)
In-Reply-To: <5338880D.50709@oracle.com>

On Mon, Mar 31, 2014 at 05:09:33AM +0800, Bob Liu wrote:
> 
> 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>

Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Thanks!
> 
> > ---
> >  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:
> > 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

      reply	other threads:[~2014-04-03 18:04 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
2014-04-03 18:04   ` Konrad Rzeszutek Wilk [this message]

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=20140403180441.GA24597@andromeda.dapyr.net \
    --to=konrad@darnok.org \
    --cc=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.