Patch "lib/vsprintf: Remove atomic-unsafe support for %pCr" has been added to the 4.9-stable tree
Subsystems (3)
gregkh at linuxfoundation.org
AppliedThis is a note to let you know that I've just added the patch titled
lib/vsprintf: Remove atomic-unsafe support for %pCr
to the 4.9-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:
lib-vsprintf-remove-atomic-unsafe-support-for-pcr.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
666902e42fd8344b923c02dc5b0f37948ff4f225Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <[email protected]>
Date: Fri, 1 Jun 2018 11:28:22 +0200
Subject: lib/vsprintf: Remove atomic-unsafe support for %pCr
From: Geert Uytterhoeven <[email protected]>
commit 666902e42fd8344b923c02dc5b0f37948ff4f225 upstream.
"%pCr" formats the current rate of a clock, and calls clk_get_rate(). The latter obtains a mutex, hence it must not be called from atomic context.
Remove support for this rarely-used format, as vsprintf() (and e.g. printk()) must be callable from any context.
Any remaining out-of-tree users will start seeing the clock's name printed instead of its rate.
To: Jia-Ju Bai <[email protected]>
To: Jonathan Corbet <[email protected]>
To: Michael Turquette <[email protected]>
To: Stephen Boyd <[email protected]>
To: Zhang Rui <[email protected]>
To: Eduardo Valentin <[email protected]>
To: Eric Anholt <[email protected]>
To: Stefan Wahren <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
--- Documentation/printk-formats.txt | 3 +-- lib/vsprintf.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-)
Documentation/printk-formats.txt +1 -2
@@ -279,11 +279,10 @@ struct clk: %pC pll1 %pCn pll1 - %pCr 1560000000 For printing struct clk structures. '%pC' and '%pCn' print the name (Common Clock Framework) or address (legacy clock framework) of the - structure; '%pCr' prints the current clock rate. + structure. Passed by reference.
lib/vsprintf.c +0 -3
@@ -1391,9 +1391,6 @@ char *clock(char *buf, char *end, structreturn string (buf, end,NULL , spec);switch (fmt[1 ]) { -case 'r' : -return number (buf, end,clk_get_rate (clk), spec); -case 'n' :default :#ifdef CONFIG_COMMON_CLK
Patches currently in stable-queue which might be from geert+renesas at glider.be are
queue-4.9/lib-vsprintf-remove-atomic-unsafe-support-for-pcr.patch queue-4.9/serial-sh-sci-use-spin_-try-lock_irqsave-instead-of-open-coding-version.patch queue-4.9/clk-renesas-cpg-mssr-stop-using-printk-format-pcr.patch