diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-29 10:13:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-29 10:13:23 -0800 |
commit | 55db91fbaad9ea769d516e6867195808b4399894 (patch) | |
tree | 67453716f1604fd65a7b979fb55347a050582d02 /mm | |
parent | 9ef10340749e1da0c7fde609cedd5360f8484a0b (diff) | |
parent | 6ab7d47bcbf0144a8cb81536c2cead4cde18acfe (diff) | |
download | linux-stable-55db91fbaad9ea769d516e6867195808b4399894.tar.gz linux-stable-55db91fbaad9ea769d516e6867195808b4399894.tar.bz2 linux-stable-55db91fbaad9ea769d516e6867195808b4399894.zip |
Merge branch 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu
Pull percpu update from Dennis Zhou:
"Michael Cree noted generic UP Alpha has been broken since v3.18. This
is a small fix for locking in UP percpu code that fixes the issue"
* 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
percpu: convert spin_lock_irq to spin_lock_irqsave.
Diffstat (limited to 'mm')
-rw-r--r-- | mm/percpu-km.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/percpu-km.c b/mm/percpu-km.c index 38de70ab1a0d..0f643dc2dc65 100644 --- a/mm/percpu-km.c +++ b/mm/percpu-km.c @@ -50,6 +50,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp) const int nr_pages = pcpu_group_sizes[0] >> PAGE_SHIFT; struct pcpu_chunk *chunk; struct page *pages; + unsigned long flags; int i; chunk = pcpu_alloc_chunk(gfp); @@ -68,9 +69,9 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp) chunk->data = pages; chunk->base_addr = page_address(pages) - pcpu_group_offsets[0]; - spin_lock_irq(&pcpu_lock); + spin_lock_irqsave(&pcpu_lock, flags); pcpu_chunk_populated(chunk, 0, nr_pages, false); - spin_unlock_irq(&pcpu_lock); + spin_unlock_irqrestore(&pcpu_lock, flags); pcpu_stats_chunk_alloc(); trace_percpu_create_chunk(chunk->base_addr); |