linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: kirill@shutemov.name, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, tj@kernel.org, rientjes@google.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 1/3] x86/numa_emulation: fix potential memory leak
Date: Tue, 27 Jun 2017 20:10:49 +0200	[thread overview]
Message-ID: <20170627181049.phlrtpkf3mqi4kt6@pd.tnic> (raw)
In-Reply-To: <20170626231127.GA53180@WeideMacBook-Pro.local>

On Tue, Jun 27, 2017 at 07:11:27AM +0800, Wei Yang wrote:
> It means numa emulation is not properly configured.

Or what the error message says: it cannot determine the default physical
node because NUMA emulation is not properly configured. What I'm trying
to say, is, explain the *why* in the commit message, not the *what*. The
*what* one can see in the code.

> Well, to this particular piece, have a for loop within a function doesn't look
> like a big deal to me. So you prefer to take every for loop in this function
> out?

As I said, I'd prefer you take this loop out and turn it into a separate
function in one go, along with fixing the potential memory leak.

> Last but not the least, these are two issues:
> 
> The problem this patch wants to address is the memory leak, while the concern
> here you mentioned is the coding style.

Let's not get too pedantic here: if you carve it out in a separate
function, it is still clear what the patch is doing.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

  reply	other threads:[~2017-06-27 18:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 13:04 [PATCH V2 0/3] Refine numa_emulation Wei Yang
2017-05-02 13:04 ` [PATCH V2 1/3] x86/numa_emulation: fix potential memory leak Wei Yang
2017-06-26 15:31   ` Borislav Petkov
2017-06-26 23:11     ` Wei Yang
2017-06-27 18:10       ` Borislav Petkov [this message]
2017-06-27 23:37         ` Wei Yang
2017-05-02 13:04 ` [PATCH V2 2/3] x86/numa_emulation: assign physnode_mask directly from numa_nodes_parsed Wei Yang
2017-06-26 18:40   ` Borislav Petkov
2017-06-26 23:12     ` Wei Yang
2017-05-02 13:04 ` [PATCH V2 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes Wei Yang
2017-06-06  3:15 ` [PATCH V2 0/3] Refine numa_emulation Wei Yang
2017-06-25  0:26 ` Wei Yang

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=20170627181049.phlrtpkf3mqi4kt6@pd.tnic \
    --to=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=richard.weiyang@gmail.com \
    --cc=rientjes@google.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).