All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: qemu-trivial@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org, agraf@suse.de, qiaonuohan@cn.fujitsu.com,
	pbonzini@redhat.com, lcapitulino@redhat.com
Subject: Re: [Qemu-trivial] [PATCH] dump.c: Fix memory leak issue in cleanup processing for dump_init()
Date: Wed, 13 Aug 2014 06:19:40 +0800	[thread overview]
Message-ID: <53EA92FC.6000305@gmail.com> (raw)
In-Reply-To: <53EA3604.5020402@redhat.com>

On 08/12/2014 11:43 PM, Laszlo Ersek wrote:
> On 08/03/14 17:28, Chen Gang wrote:
>> In dump_init(), when failure occurs, need notice about 'fd' and memory
>> mapping. So call dump_cleanup() for it (need let all initializations at
>> front).
>>
>> Also simplify dump_cleanup(): remove redundant 'ret' and redundant 'fd'
>> checking.
>>
>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
>> ---
>>
[...]
> 
> The patch is not trivial at all, because the lifecycles of the affected
> resources are not trivial.
> 

OK, thanks.

For me, next, I shall split it into 2 pieces, one for resource leak, and
the other for improving current code, which may let reviewers easier
(maybe 2 patches belong to 2 different maintainers).

> The commit message is an abomination. If you want to contribute to open
> source, please learn proper English, and make a *serious* effort to
> document your changes. Don't expect earlier contributors to have any
> working knowledge about a file they have *maybe* touched several months
> ago. People have to swap out a whole load of crap from their minds, and
> swap in the old crap, to understand your patch. Help them by writing
> good commit messages.
> 

OK, thanks, And I am just trying to be improving.

 - always communicate with open source (qemu/kvm/kernel/binutils/gcc) in
   English (it must be).

 - I read/listen to Holy Bible in English every day: morning and evening
   in subway (I spend 2 hours from home to office, so 4 hours total),
   so at least, I spend about 1-1.5 hours for reading/listening per day.

> That said, no matter how annoying this submission is, my conscience
> didn't allow me to let it go ignored, so I spent the time and made an
> effort to track the lifetimes of "s->fd" and "s->list" in, and around,
> dump_init().
> 

OK, thanks, next, you can notify me for it, and I shall try to give some
related test (or we can test together for it), although it is not quite
easy for me.

> The patch seems correct. That's your only excuse for the loss of gray
> matter I've suffered while parsing your commit message.
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 

OK, thank you very much.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed


WARNING: multiple messages have this Message-ID (diff)
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: qemu-trivial@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org, agraf@suse.de, qiaonuohan@cn.fujitsu.com,
	pbonzini@redhat.com, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH] dump.c: Fix memory leak issue in cleanup processing for dump_init()
Date: Wed, 13 Aug 2014 06:19:40 +0800	[thread overview]
Message-ID: <53EA92FC.6000305@gmail.com> (raw)
In-Reply-To: <53EA3604.5020402@redhat.com>

On 08/12/2014 11:43 PM, Laszlo Ersek wrote:
> On 08/03/14 17:28, Chen Gang wrote:
>> In dump_init(), when failure occurs, need notice about 'fd' and memory
>> mapping. So call dump_cleanup() for it (need let all initializations at
>> front).
>>
>> Also simplify dump_cleanup(): remove redundant 'ret' and redundant 'fd'
>> checking.
>>
>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
>> ---
>>
[...]
> 
> The patch is not trivial at all, because the lifecycles of the affected
> resources are not trivial.
> 

OK, thanks.

For me, next, I shall split it into 2 pieces, one for resource leak, and
the other for improving current code, which may let reviewers easier
(maybe 2 patches belong to 2 different maintainers).

> The commit message is an abomination. If you want to contribute to open
> source, please learn proper English, and make a *serious* effort to
> document your changes. Don't expect earlier contributors to have any
> working knowledge about a file they have *maybe* touched several months
> ago. People have to swap out a whole load of crap from their minds, and
> swap in the old crap, to understand your patch. Help them by writing
> good commit messages.
> 

OK, thanks, And I am just trying to be improving.

 - always communicate with open source (qemu/kvm/kernel/binutils/gcc) in
   English (it must be).

 - I read/listen to Holy Bible in English every day: morning and evening
   in subway (I spend 2 hours from home to office, so 4 hours total),
   so at least, I spend about 1-1.5 hours for reading/listening per day.

> That said, no matter how annoying this submission is, my conscience
> didn't allow me to let it go ignored, so I spent the time and made an
> effort to track the lifetimes of "s->fd" and "s->list" in, and around,
> dump_init().
> 

OK, thanks, next, you can notify me for it, and I shall try to give some
related test (or we can test together for it), although it is not quite
easy for me.

> The patch seems correct. That's your only excuse for the loss of gray
> matter I've suffered while parsing your commit message.
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 

OK, thank you very much.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed

  reply	other threads:[~2014-08-12 22:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03 15:28 [Qemu-trivial] [PATCH] dump.c: Fix memory leak issue in cleanup processing for dump_init() Chen Gang
2014-08-03 15:28 ` [Qemu-devel] " Chen Gang
2014-08-03 15:56 ` [Qemu-trivial] " Laszlo Ersek
2014-08-03 15:56   ` [Qemu-devel] " Laszlo Ersek
2014-08-04 13:51   ` [Qemu-trivial] " Chen Gang
2014-08-04 13:51     ` [Qemu-devel] " Chen Gang
2014-08-11 19:47     ` [Qemu-trivial] " Chen Gang
2014-08-11 19:47       ` [Qemu-devel] " Chen Gang
2014-08-04  7:59 ` [Qemu-trivial] Cc'ing emails [was: [PATCH] dump.c: Fix memory leak issue in cleanup processing for dump_init()] Michael Tokarev
2014-08-04  7:59   ` [Qemu-devel] " Michael Tokarev
2014-08-04 14:13   ` [Qemu-trivial] " Chen Gang
2014-08-04 14:13     ` [Qemu-devel] " Chen Gang
2014-08-04 15:43   ` [Qemu-trivial] [Qemu-devel] Cc'ing emails [ Markus Armbruster
2014-08-04 15:43     ` Markus Armbruster
2014-08-05  4:41     ` [Qemu-trivial] " Chen Gang
2014-08-05  4:41       ` Chen Gang
2014-08-05  7:08       ` [Qemu-trivial] " Michael Tokarev
2014-08-05  7:08         ` Michael Tokarev
2014-08-05  8:07         ` [Qemu-trivial] " Peter Maydell
2014-08-05  8:07           ` Peter Maydell
2014-08-05 12:20           ` [Qemu-trivial] " Chen Gang
2014-08-05 12:20             ` Chen Gang
2014-08-05  9:41         ` [Qemu-trivial] " Markus Armbruster
2014-08-05  9:41           ` Markus Armbruster
2014-08-05 13:25           ` [Qemu-trivial] " Anthony Liguori
2014-08-05 13:25             ` Anthony Liguori
2014-08-12 15:43 ` [Qemu-trivial] [PATCH] dump.c: Fix memory leak issue in cleanup processing for dump_init() Laszlo Ersek
2014-08-12 15:43   ` [Qemu-devel] " Laszlo Ersek
2014-08-12 22:19   ` Chen Gang [this message]
2014-08-12 22:19     ` Chen Gang
2014-08-14 20:49 ` [Qemu-trivial] " Luiz Capitulino
2014-08-14 20:49   ` [Qemu-devel] " Luiz Capitulino
2014-08-14 22:03   ` [Qemu-trivial] " Chen Gang
2014-08-14 22:03     ` [Qemu-devel] " Chen Gang

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=53EA92FC.6000305@gmail.com \
    --to=gang.chen.5i5j@gmail.com \
    --cc=agraf@suse.de \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=qiaonuohan@cn.fujitsu.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.