]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RAS/CEC: Convert the timer callback to a workqueue
authorCong Wang <xiyou.wangcong@gmail.com>
Tue, 16 Apr 2019 21:33:51 +0000 (14:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2019 06:18:06 +0000 (08:18 +0200)
commite40db40e45ccffaa2c61425e85a8358e54c96d84
tree9c847a01c0ee7149c4dc5a4d91cad7c563162d78
parentca4c34037bb9b96263f3cf6043079e15e46a25b1
RAS/CEC: Convert the timer callback to a workqueue

commit 0ade0b6240c4853cf9725924c46c10f4251639d7 upstream.

cec_timer_fn() is a timer callback which reads ce_arr.array[] and
updates its decay values. However, it runs in interrupt context and the
mutex protection the CEC uses for that array, is inadequate. Convert the
used timer to a workqueue to keep the tasks the CEC performs preemptible
and thus low-prio.

 [ bp: Rewrite commit message.
   s/timer/decay/gi to make it agnostic as to what facility is used. ]

Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector")
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20190416213351.28999-2-xiyou.wangcong@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ras/cec.c