Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653157 > unrolled thread

Re: [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug

Started byMichael Ellerman <mpe@ellerman.id.au>
First post2017-05-30 13:50 +0200
Last post2017-05-31 06:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug Michael Ellerman <mpe@ellerman.id.au> - 2017-05-30 13:50 +0200
    Re: [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug Nathan Fontenot <nfont@linux.vnet.ibm.com> - 2017-05-30 19:40 +0200
      Re: [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug Michael Ellerman <mpe@ellerman.id.au> - 2017-05-31 06:10 +0200

#1653157 — Re: [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-05-30 13:50 +0200
SubjectRe: [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug
Message-ID<tMNOW-6P4-21@gated-at.bofh.it>
Michael Bringmann <mwb@linux.vnet.ibm.com> writes:

> When adding or removing memory, the aa_index (affinity value) for the
> memblock must also be converted to match the endianness of the rest
> of the 'ibm,dynamic-memory' property.  Otherwise, subsequent retrieval
> of the attribute will likely lead to non-existent nodes, followed by
> using the default node in the code inappropriately.
>
> Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
>
> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
> index e104c71..1fb162b 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
> @@ -124,6 +124,7 @@ static struct property *dlpar_clone_drconf_property(struct device_node *dn)
>  	for (i = 0; i < num_lmbs; i++) {
>  		lmbs[i].base_addr = be64_to_cpu(lmbs[i].base_addr);
>  		lmbs[i].drc_index = be32_to_cpu(lmbs[i].drc_index);
> +		lmbs[i].aa_index = be32_to_cpu(lmbs[i].aa_index);
>  		lmbs[i].flags = be32_to_cpu(lmbs[i].flags);
>  	}
>  

AFAICS this code was added in commit 5f97b2a0d176 ("powerpc/pseries:
Implement memory hotplug add in the kernel").

So this should probably be marked:

  Fixes: 5f97b2a0d176 ("powerpc/pseries: Implement memory hotplug add in the kernel")

And it seems like a bug we'd want fixed in stable, so:

  Cc: stable@vger.kernel.org # v4.1+


Am I right?

cheers

[toc] | [next] | [standalone]


#1653430

FromNathan Fontenot <nfont@linux.vnet.ibm.com>
Date2017-05-30 19:40 +0200
Message-ID<tMThD-1Qx-9@gated-at.bofh.it>
In reply to#1653157
On 05/30/2017 06:41 AM, Michael Ellerman wrote:
> Michael Bringmann <mwb@linux.vnet.ibm.com> writes:
> 
>> When adding or removing memory, the aa_index (affinity value) for the
>> memblock must also be converted to match the endianness of the rest
>> of the 'ibm,dynamic-memory' property.  Otherwise, subsequent retrieval
>> of the attribute will likely lead to non-existent nodes, followed by
>> using the default node in the code inappropriately.
>>
>> Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
>>
>> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
>> index e104c71..1fb162b 100644
>> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
>> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
>> @@ -124,6 +124,7 @@ static struct property *dlpar_clone_drconf_property(struct device_node *dn)
>>  	for (i = 0; i < num_lmbs; i++) {
>>  		lmbs[i].base_addr = be64_to_cpu(lmbs[i].base_addr);
>>  		lmbs[i].drc_index = be32_to_cpu(lmbs[i].drc_index);
>> +		lmbs[i].aa_index = be32_to_cpu(lmbs[i].aa_index);
>>  		lmbs[i].flags = be32_to_cpu(lmbs[i].flags);
>>  	}
>>  
> 
> AFAICS this code was added in commit 5f97b2a0d176 ("powerpc/pseries:
> Implement memory hotplug add in the kernel").
> 
> So this should probably be marked:
> 
>   Fixes: 5f97b2a0d176 ("powerpc/pseries: Implement memory hotplug add in the kernel")
> 
> And it seems like a bug we'd want fixed in stable, so:
> 
>   Cc: stable@vger.kernel.org # v4.1+
> 
> 
> Am I right?

Yes, that is correct.

-Nathan

[toc] | [prev] | [next] | [standalone]


#1653818

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-05-31 06:10 +0200
Message-ID<tN37k-8e3-7@gated-at.bofh.it>
In reply to#1653430
Nathan Fontenot <nfont@linux.vnet.ibm.com> writes:
> On 05/30/2017 06:41 AM, Michael Ellerman wrote:
>> Michael Bringmann <mwb@linux.vnet.ibm.com> writes:
>>> When adding or removing memory, the aa_index (affinity value) for the
>>> memblock must also be converted to match the endianness of the rest
>>> of the 'ibm,dynamic-memory' property.  Otherwise, subsequent retrieval
>>> of the attribute will likely lead to non-existent nodes, followed by
>>> using the default node in the code inappropriately.
>>>
>>> Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
>>>
>>> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
>>> index e104c71..1fb162b 100644
>>> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
>>> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
>>> @@ -124,6 +124,7 @@ static struct property *dlpar_clone_drconf_property(struct device_node *dn)
>>>  	for (i = 0; i < num_lmbs; i++) {
>>>  		lmbs[i].base_addr = be64_to_cpu(lmbs[i].base_addr);
>>>  		lmbs[i].drc_index = be32_to_cpu(lmbs[i].drc_index);
>>> +		lmbs[i].aa_index = be32_to_cpu(lmbs[i].aa_index);
>>>  		lmbs[i].flags = be32_to_cpu(lmbs[i].flags);
>>>  	}
>>>  
>> 
>> AFAICS this code was added in commit 5f97b2a0d176 ("powerpc/pseries:
>> Implement memory hotplug add in the kernel").
>> 
>> So this should probably be marked:
>> 
>>   Fixes: 5f97b2a0d176 ("powerpc/pseries: Implement memory hotplug add in the kernel")
>> 
>> And it seems like a bug we'd want fixed in stable, so:
>> 
>>   Cc: stable@vger.kernel.org # v4.1+
>> 
>> Am I right?
>
> Yes, that is correct.

Thanks.

cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web