* Patch "percpu: don't forget to free the temporary struct pcpu_alloc_info" has been added to the 4.14-stable tree
@ 2017-12-20 17:20 gregkh
2017-12-20 18:41 ` Nicolas Pitre
0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2017-12-20 17:20 UTC (permalink / raw)
To: nicolas.pitre, alexander.levin, dennisszhou, gregkh, nico, tj
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
percpu: don't forget to free the temporary struct pcpu_alloc_info
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
percpu-don-t-forget-to-free-the-temporary-struct-pcpu_alloc_info.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Wed Dec 20 18:17:52 CET 2017
From: Nicolas Pitre <nicolas.pitre@linaro.org>
Date: Tue, 3 Oct 2017 18:29:49 -0400
Subject: percpu: don't forget to free the temporary struct pcpu_alloc_info
From: Nicolas Pitre <nicolas.pitre@linaro.org>
[ Upstream commit 438a50618095061920d3a30d4c5ca1ef2e0ff860 ]
Unlike the SMP case, the !SMP case does not free the memory for struct
pcpu_alloc_info allocated in setup_per_cpu_areas(). And to give it a
chance of being reused by the page allocator later, align it to a page
boundary just like its size.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Dennis Zhou <dennisszhou@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/percpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1856,7 +1856,7 @@ struct pcpu_alloc_info * __init pcpu_all
__alignof__(ai->groups[0].cpu_map[0]));
ai_size = base_size + nr_units * sizeof(ai->groups[0].cpu_map[0]);
- ptr = memblock_virt_alloc_nopanic(PFN_ALIGN(ai_size), 0);
+ ptr = memblock_virt_alloc_nopanic(PFN_ALIGN(ai_size), PAGE_SIZE);
if (!ptr)
return NULL;
ai = ptr;
@@ -2719,6 +2719,7 @@ void __init setup_per_cpu_areas(void)
if (pcpu_setup_first_chunk(ai, fc) < 0)
panic("Failed to initialize percpu areas.");
+ pcpu_free_alloc_info(ai);
}
#endif /* CONFIG_SMP */
Patches currently in stable-queue which might be from nicolas.pitre@linaro.org are
queue-4.14/percpu-don-t-forget-to-free-the-temporary-struct-pcpu_alloc_info.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "percpu: don't forget to free the temporary struct pcpu_alloc_info" has been added to the 4.14-stable tree
2017-12-20 17:20 Patch "percpu: don't forget to free the temporary struct pcpu_alloc_info" has been added to the 4.14-stable tree gregkh
@ 2017-12-20 18:41 ` Nicolas Pitre
2017-12-21 0:59 ` alexander.levin
2017-12-21 8:05 ` Greg KH
0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Pitre @ 2017-12-20 18:41 UTC (permalink / raw)
To: gregkh; +Cc: alexander.levin, dennisszhou, tj, stable, stable-commits
On Wed, 20 Dec 2017, gregkh@linuxfoundation.org wrote:
> This is a note to let you know that I've just added the patch titled
>
> percpu: don't forget to free the temporary struct pcpu_alloc_info
> to the 4.14-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
> percpu-don-t-forget-to-free-the-temporary-struct-pcpu_alloc_info.patch
> and it can be found in the queue-4.14 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
If you consider this patch worthy enough for the stable tree, then you
should also pick commit abee210500ed otherwise the CRIS architecture
will regress.
> From foo@baz Wed Dec 20 18:17:52 CET 2017
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
> Date: Tue, 3 Oct 2017 18:29:49 -0400
> Subject: percpu: don't forget to free the temporary struct pcpu_alloc_info
>
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
>
>
> [ Upstream commit 438a50618095061920d3a30d4c5ca1ef2e0ff860 ]
>
> Unlike the SMP case, the !SMP case does not free the memory for struct
> pcpu_alloc_info allocated in setup_per_cpu_areas(). And to give it a
> chance of being reused by the page allocator later, align it to a page
> boundary just like its size.
>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> Acked-by: Dennis Zhou <dennisszhou@gmail.com>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> mm/percpu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -1856,7 +1856,7 @@ struct pcpu_alloc_info * __init pcpu_all
> __alignof__(ai->groups[0].cpu_map[0]));
> ai_size = base_size + nr_units * sizeof(ai->groups[0].cpu_map[0]);
>
> - ptr = memblock_virt_alloc_nopanic(PFN_ALIGN(ai_size), 0);
> + ptr = memblock_virt_alloc_nopanic(PFN_ALIGN(ai_size), PAGE_SIZE);
> if (!ptr)
> return NULL;
> ai = ptr;
> @@ -2719,6 +2719,7 @@ void __init setup_per_cpu_areas(void)
>
> if (pcpu_setup_first_chunk(ai, fc) < 0)
> panic("Failed to initialize percpu areas.");
> + pcpu_free_alloc_info(ai);
> }
>
> #endif /* CONFIG_SMP */
>
>
> Patches currently in stable-queue which might be from nicolas.pitre@linaro.org are
>
> queue-4.14/percpu-don-t-forget-to-free-the-temporary-struct-pcpu_alloc_info.patch
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "percpu: don't forget to free the temporary struct pcpu_alloc_info" has been added to the 4.14-stable tree
2017-12-20 18:41 ` Nicolas Pitre
@ 2017-12-21 0:59 ` alexander.levin
2017-12-21 8:05 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: alexander.levin @ 2017-12-21 0:59 UTC (permalink / raw)
To: Nicolas Pitre
Cc: gregkh@linuxfoundation.org, dennisszhou@gmail.com, tj@kernel.org,
stable@vger.kernel.org, stable-commits@vger.kernel.org
On Wed, Dec 20, 2017 at 01:41:01PM -0500, Nicolas Pitre wrote:
>On Wed, 20 Dec 2017, gregkh@linuxfoundation.org wrote:
>
>> This is a note to let you know that I've just added the patch titled
>>
>> percpu: don't forget to free the temporary struct pcpu_alloc_info
>> to the 4.14-stable tree which can be found at:
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kernel.org_git_-3Fp-3Dlinux_kernel_git_stable_stable-2Dqueue.git-3Ba-3Dsummary&d=DwIBAg&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=bUtaaC9mlBij4OjEG_D-KPul_335azYzfC4Rjgomobo&m=qnNDf4IeHRQ_ffqQXDeVcI9CCT5Pq7EmTmp5xbKWg-I&s=KgCwQ9E3kx6oTOuZ75TsmUM6dqxn_zrSgFwENCasLi8&e=
>>
>> The filename of the patch is:
>> percpu-don-t-forget-to-free-the-temporary-struct-pcpu_alloc_info.patch
>> and it can be found in the queue-4.14 subdirectory.
>>
>> If you, or anyone else, feels it should not be added to the stable tree,
>> please let <stable@vger.kernel.org> know about it.
>
>If you consider this patch worthy enough for the stable tree, then you
>should also pick commit abee210500ed otherwise the CRIS architecture
>will regress.
In this case I'd rather just drop this commit, at least until this
issue is fixed (rather than ducttaped) upstream. Thanks Nicolas!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "percpu: don't forget to free the temporary struct pcpu_alloc_info" has been added to the 4.14-stable tree
2017-12-20 18:41 ` Nicolas Pitre
2017-12-21 0:59 ` alexander.levin
@ 2017-12-21 8:05 ` Greg KH
2017-12-21 22:40 ` Nicolas Pitre
1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2017-12-21 8:05 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: alexander.levin, dennisszhou, tj, stable, stable-commits
On Wed, Dec 20, 2017 at 01:41:01PM -0500, Nicolas Pitre wrote:
> On Wed, 20 Dec 2017, gregkh@linuxfoundation.org wrote:
>
> > This is a note to let you know that I've just added the patch titled
> >
> > percpu: don't forget to free the temporary struct pcpu_alloc_info
> > to the 4.14-stable tree which can be found at:
> > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >
> > The filename of the patch is:
> > percpu-don-t-forget-to-free-the-temporary-struct-pcpu_alloc_info.patch
> > and it can be found in the queue-4.14 subdirectory.
> >
> > If you, or anyone else, feels it should not be added to the stable tree,
> > please let <stable@vger.kernel.org> know about it.
>
> If you consider this patch worthy enough for the stable tree, then you
> should also pick commit abee210500ed otherwise the CRIS architecture
> will regress.
Sadly, CRIS is dead, but yeah, it's not good to kill it earlier than
expected :)
I'll take Sasha's patch to drop this, thanks.
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "percpu: don't forget to free the temporary struct pcpu_alloc_info" has been added to the 4.14-stable tree
2017-12-21 8:05 ` Greg KH
@ 2017-12-21 22:40 ` Nicolas Pitre
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pitre @ 2017-12-21 22:40 UTC (permalink / raw)
To: Greg KH; +Cc: alexander.levin, dennisszhou, tj, stable, stable-commits
On Thu, 21 Dec 2017, Greg KH wrote:
> On Wed, Dec 20, 2017 at 01:41:01PM -0500, Nicolas Pitre wrote:
> > On Wed, 20 Dec 2017, gregkh@linuxfoundation.org wrote:
> >
> > > If you, or anyone else, feels it should not be added to the stable tree,
> > > please let <stable@vger.kernel.org> know about it.
> >
> > If you consider this patch worthy enough for the stable tree, then you
> > should also pick commit abee210500ed otherwise the CRIS architecture
> > will regress.
>
> Sadly, CRIS is dead, but yeah, it's not good to kill it earlier than
> expected :)
Well, some people noticed soon enough after this patch hit mainline that
their CRIS setup didn't boot any longer. A good way to know if some
architecture is really dead is to break it! ;-)
Nicolas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-21 22:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20 17:20 Patch "percpu: don't forget to free the temporary struct pcpu_alloc_info" has been added to the 4.14-stable tree gregkh
2017-12-20 18:41 ` Nicolas Pitre
2017-12-21 0:59 ` alexander.levin
2017-12-21 8:05 ` Greg KH
2017-12-21 22:40 ` Nicolas Pitre
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).