diff --git a/debian/changelog b/debian/changelog index 87838ee3b..b55ca1aac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -98,6 +98,8 @@ linux (4.19.17-1) UNRELEASED; urgency=medium * [i386] debian/control: Fix cross-compiler build-dependency * debian/README.source: Document how to run kconfigeditor2 * [armhf,arm64] serial: 8250: Disable SERIAL_8250_DEPRECATED_OPTIONS + * percpu: convert spin_lock_irq to spin_lock_irqsave (fixes boot failure with + alpha-generic flavour) [ Marcin Juszkiewicz ] * [arm64] enable ARM_CCI_PMU so ARM_CCI400_PMU and ARM_CCI5xx_PMU options diff --git a/debian/patches/bugfix/all/percpu-convert-spin_lock_irq-to-spin_lock_irqsave.patch b/debian/patches/bugfix/all/percpu-convert-spin_lock_irq-to-spin_lock_irqsave.patch new file mode 100644 index 000000000..bffa68484 --- /dev/null +++ b/debian/patches/bugfix/all/percpu-convert-spin_lock_irq-to-spin_lock_irqsave.patch @@ -0,0 +1,49 @@ +From: Dennis Zhou +Date: Tue, 18 Dec 2018 08:42:27 -0800 +Subject: percpu: convert spin_lock_irq to spin_lock_irqsave. +Origin: https://git.kernel.org/linus/6ab7d47bcbf0144a8cb81536c2cead4cde18acfe + +From Michael Cree: + "Bisection lead to commit b38d08f3181c ("percpu: restructure + locking") as being the cause of lockups at initial boot on + the kernel built for generic Alpha. + + On a suggestion by Tejun Heo that: + + So, the only thing I can think of is that it's calling + spin_unlock_irq() while irq handling isn't set up yet. + Can you please try the followings? + + 1. Convert all spin_[un]lock_irq() to + spin_lock_irqsave/unlock_irqrestore()." + +Fixes: b38d08f3181c ("percpu: restructure locking") +Reported-and-tested-by: Michael Cree +Acked-by: Tejun Heo +Signed-off-by: Dennis Zhou +--- + mm/percpu-km.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/mm/percpu-km.c ++++ b/mm/percpu-km.c +@@ -50,6 +50,7 @@ static struct pcpu_chunk *pcpu_create_ch + 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_ch + 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); diff --git a/debian/patches/series b/debian/patches/series index 6e5abf340..afd30d312 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -101,6 +101,7 @@ bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch debian/revert-objtool-fix-config_stack_validation-y-warning.patch bugfix/all/ipv6-Consider-sk_bound_dev_if-when-binding-a-socket-.patch bugfix/all/posix-cpu-timers-Unbreak-timer-rearming.patch +bugfix/all/percpu-convert-spin_lock_irq-to-spin_lock_irqsave.patch # Miscellaneous features