percpu: convert spin_lock_irq to spin_lock_irqsave.
authorDennis Zhou <dennis@kernel.org>
Tue, 18 Dec 2018 16:42:27 +0000 (08:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:05 +0000 (19:46 +0100)
commit04fed9d3e7d2fdce1217195fc5ddc08e8209579a
tree10fd4a9e1c1abcce24e9a87ce21be16a67738fee
parent440814927873ccc2891ec42aa7e1d3cf927b0bc7
percpu: convert spin_lock_irq to spin_lock_irqsave.

[ Upstream commit 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 <mcree@orcon.net.nz>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mm/percpu-km.c