All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxc: Fix CID 1351225 resource leak
@ 2016-02-10  9:07 Harmandeep Kaur
  2016-02-10  9:28 ` Dario Faggioli
  0 siblings, 1 reply; 4+ messages in thread
From: Harmandeep Kaur @ 2016-02-10  9:07 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.liu2, ian.campbell, stefano.stabellini, dario.faggioli,
	ian.jackson, Harmandeep Kaur

Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
---
 tools/libxc/xc_offline_page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c
index bc91d51..3248a34 100644
--- a/tools/libxc/xc_offline_page.c
+++ b/tools/libxc/xc_offline_page.c
@@ -504,7 +504,7 @@ int xc_exchange_page(xc_interface *xch, int domid, xen_pfn_t mfn)
     if ( xc_map_domain_meminfo(xch, domid, &minfo) )
     {
         PERROR("Could not map domain's memory information\n");
-        return -1;
+        goto failed;
     }
 
     /* For translation macros */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxc: Fix CID 1351225 resource leak
  2016-02-10  9:07 [PATCH] libxc: Fix CID 1351225 resource leak Harmandeep Kaur
@ 2016-02-10  9:28 ` Dario Faggioli
  2016-02-10  9:48   ` Ian Campbell
  2016-02-10 11:16   ` Ian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Dario Faggioli @ 2016-02-10  9:28 UTC (permalink / raw)
  To: Harmandeep Kaur, xen-devel
  Cc: wei.liu2, ian.jackson, ian.campbell, stefano.stabellini


[-- Attachment #1.1: Type: text/plain, Size: 1148 bytes --]

Hi Harmandeep,

Thanks for this patch.

On Wed, 2016-02-10 at 14:37 +0530, Harmandeep Kaur wrote:
>
In general, I think it would be best if the subject is a bit more
"explicative", and if you add a few words of changelog, here, above the
S-o-b.

In this case, this could be something like this.

Subject: "libxc: fix leak in xc_offline_page error path"

Changelog: "
Avoid leaking the mapping of the m2p in one of the possible failure
cases.

Coverity CID 1351225
"

> Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
>
That being said, this case is very simple, so I'll leave it to the
tools maintainers to tell whether they want something like what I
described above in place or not.

The code looks ok to me, so, with or without the subject/changelog
improvements:

Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxc: Fix CID 1351225 resource leak
  2016-02-10  9:28 ` Dario Faggioli
@ 2016-02-10  9:48   ` Ian Campbell
  2016-02-10 11:16   ` Ian Jackson
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2016-02-10  9:48 UTC (permalink / raw)
  To: Dario Faggioli, Harmandeep Kaur, xen-devel
  Cc: wei.liu2, ian.jackson, stefano.stabellini

On Wed, 2016-02-10 at 10:28 +0100, Dario Faggioli wrote:
> Hi Harmandeep,
> 
> Thanks for this patch.
> 
> On Wed, 2016-02-10 at 14:37 +0530, Harmandeep Kaur wrote:
> > 
> In general, I think it would be best if the subject is a bit more
> "explicative", and if you add a few words of changelog, here, above the
> S-o-b.
> 
> In this case, this could be something like this.
> 
> Subject: "libxc: fix leak in xc_offline_page error path"
> 
> Changelog: "
> Avoid leaking the mapping of the m2p in one of the possible failure
> cases.
> 
> Coverity CID 1351225
> "
> 
> > Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
> > 
> That being said, this case is very simple, so I'll leave it to the
> tools maintainers to tell whether they want something like what I
> described above in place or not.

I was going to comment the same, so yes please. The subject and commit
message should describe the actual change and the CID should simply be
referenced as Dario has in his example.

> 
> The code looks ok to me, so, with or without the subject/changelog
> improvements:
> 
> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
> 
> Regards,
> Dario

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxc: Fix CID 1351225 resource leak
  2016-02-10  9:28 ` Dario Faggioli
  2016-02-10  9:48   ` Ian Campbell
@ 2016-02-10 11:16   ` Ian Jackson
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2016-02-10 11:16 UTC (permalink / raw)
  To: Dario Faggioli
  Cc: xen-devel, ian.campbell, wei.liu2, Harmandeep Kaur, stefano.stabellini

Dario Faggioli writes ("Re: [PATCH] libxc: Fix CID 1351225 resource leak"):
> That being said, this case is very simple, so I'll leave it to the
> tools maintainers to tell whether they want something like what I
> described above in place or not.

I agree that what you suggest would be better.  The committer could
fold in your suggestions at the time of commit, but it would be nicer
to have a formal v2 with an updated commit message.

> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>

Thanks.

Ian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-10 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-10  9:07 [PATCH] libxc: Fix CID 1351225 resource leak Harmandeep Kaur
2016-02-10  9:28 ` Dario Faggioli
2016-02-10  9:48   ` Ian Campbell
2016-02-10 11:16   ` Ian Jackson

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.