linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: anju@linux.vnet.ibm.com, paulus@samba.org, gpiccoli@linux.vnet.ibm.com
Subject: Re: powerpc/perf: Fix IMC allocation routine
Date: Wed,  1 Nov 2017 16:17:42 +1100 (AEDT)	[thread overview]
Message-ID: <3yRc122gtGz9t2m@ozlabs.org> (raw)
In-Reply-To: <20171019194133.27485-1-gpiccoli@linux.vnet.ibm.com>

On Thu, 2017-10-19 at 19:41:33 UTC, "Guilherme G. Piccoli" wrote:
> When setting nr_cpus=1, we observed a crash in IMC code during boot
> due to a missing allocation: basically, IMC code is taking the number
> of threads into account in imc_mem_init() and if we manually set
> nr_cpus for a value that is not multiple of the number of threads per
> core, an integer division in that function will discard the decimal
> portion, leading IMC to not allocate one mem_info struct. This causes
> a NULL pointer dereference later, on is_core_imc_mem_inited().
> 
> This patch just rounds that division up, fixing the bug.
> 
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/0b167f11085a34281349f395d20005

cheers

      parent reply	other threads:[~2017-11-01  5:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 19:41 [PATCH] powerpc/perf: Fix IMC allocation routine Guilherme G. Piccoli
2017-10-24  8:34 ` Anju T Sudhakar
2017-10-24 12:17   ` Guilherme G. Piccoli
2017-11-01  5:17 ` Michael Ellerman [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=3yRc122gtGz9t2m@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=anju@linux.vnet.ibm.com \
    --cc=gpiccoli@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.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).