mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
ratelimit: add comment warning people off printk_ratelimit()
printk_ratelimit() was a bad idea - we don't want subsytem A causing ratelimiting of subsystem B's messages. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f5d87d851d
commit
77006a0a82
1 changed files with 5 additions and 0 deletions
|
@ -277,6 +277,11 @@ asmlinkage int vprintk(const char *fmt, va_list args)
|
||||||
asmlinkage int printk(const char * fmt, ...)
|
asmlinkage int printk(const char * fmt, ...)
|
||||||
__attribute__ ((format (printf, 1, 2))) __cold;
|
__attribute__ ((format (printf, 1, 2))) __cold;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Please don't use printk_ratelimit(), because it shares ratelimiting state
|
||||||
|
* with all other unrelated printk_ratelimit() callsites. Instead use
|
||||||
|
* printk_ratelimited() or plain old __ratelimit().
|
||||||
|
*/
|
||||||
extern int __printk_ratelimit(const char *func);
|
extern int __printk_ratelimit(const char *func);
|
||||||
#define printk_ratelimit() __printk_ratelimit(__func__)
|
#define printk_ratelimit() __printk_ratelimit(__func__)
|
||||||
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue