public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Dan Carpenter <dan.carpenter@oracle•com>,
	Benjamin Herrenschmidt <benh@kernel•crashing.org>,
	Alexey Kardashevskiy <aik@ozlabs•ru>
Cc: Alexey Kardashevskiy <aik@ozlabs•ru>,
	Alistair Popple <alistair@popple•id.au>,
	Mark Hairgrove <mhairgrove@nvidia•com>,
	kernel-janitors@vger•kernel.org,
	Paul Mackerras <paulus@samba•org>,
	linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH] powerpc/powernv/npu: Allocate enough memory in pnv_try_setup_npu_table_group()
Date: Wed, 09 Jan 2019 22:54:29 +1100	[thread overview]
Message-ID: <87wonerqq2.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20190109102328.GB5476@kadam>

Dan Carpenter <dan.carpenter@oracle•com> writes:
> There is a typo so we accidentally allocate enough memory for a pointer
> when we wanted to allocate enough for a struct.
>
> Fixes: 0bd971676e68 ("powerpc/powernv/npu: Add compound IOMMU groups")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle•com>
> ---
>  arch/powerpc/platforms/powernv/npu-dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, I've applied this to my fixes-test tree.

Alexey can you send me an ack?

cheers

> diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c
> index d7f742ed48ba..3f58c7dbd581 100644
> --- a/arch/powerpc/platforms/powernv/npu-dma.c
> +++ b/arch/powerpc/platforms/powernv/npu-dma.c
> @@ -564,7 +564,7 @@ struct iommu_table_group *pnv_try_setup_npu_table_group(struct pnv_ioda_pe *pe)
>  		}
>  	} else {
>  		/* Create a group for 1 GPU and attached NPUs for POWER8 */
> -		pe->npucomp = kzalloc(sizeof(pe->npucomp), GFP_KERNEL);
> +		pe->npucomp = kzalloc(sizeof(*pe->npucomp), GFP_KERNEL);
>  		table_group = &pe->npucomp->table_group;
>  		table_group->ops = &pnv_npu_peers_ops;
>  		iommu_register_group(table_group, hose->global_number,
> -- 
> 2.17.1

  reply	other threads:[~2019-01-09 11:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 10:23 [PATCH] powerpc/powernv/npu: Allocate enough memory in pnv_try_setup_npu_table_group() Dan Carpenter
2019-01-09 11:54 ` Michael Ellerman [this message]
2019-01-11  2:12   ` Alexey Kardashevskiy
2019-01-12  0:30 ` Balbir Singh
2019-01-12  5:44   ` Dan Carpenter
2019-01-12  7:34     ` Segher Boessenkool
2019-01-12 10:51       ` Dan Carpenter
2019-01-14 10:12 ` Michael Ellerman

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=87wonerqq2.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=aik@ozlabs$(echo .)ru \
    --cc=alistair@popple$(echo .)id.au \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=dan.carpenter@oracle$(echo .)com \
    --cc=kernel-janitors@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mhairgrove@nvidia$(echo .)com \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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