diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-17 13:04:47 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-17 13:04:47 -0800 |
commit | 260ad8a1ef7e30141972a721535590937df2c670 (patch) | |
tree | 760a0e19a01cc7784fb67cc5457f8be89a7d1737 | |
parent | 4eddb543d4887322bf0dc1f4af89b84e96ce23c3 (diff) | |
download | longterm-queue-2.6.32-260ad8a1ef7e30141972a721535590937df2c670.tar.gz |
2.6.32-stable patches
added patches:
kernel.h-add-printk_ratelimited-and-pr_-level-_rl.patch
-rw-r--r-- | queue-2.6.32/kernel.h-add-printk_ratelimited-and-pr_-level-_rl.patch | 85 | ||||
-rw-r--r-- | queue-2.6.32/series | 1 |
2 files changed, 86 insertions, 0 deletions
diff --git a/queue-2.6.32/kernel.h-add-printk_ratelimited-and-pr_-level-_rl.patch b/queue-2.6.32/kernel.h-add-printk_ratelimited-and-pr_-level-_rl.patch new file mode 100644 index 0000000..e30c906 --- /dev/null +++ b/queue-2.6.32/kernel.h-add-printk_ratelimited-and-pr_-level-_rl.patch @@ -0,0 +1,85 @@ +From ben@decadent.org.uk Tue Jan 17 12:03:55 2012 +From: Ben Hutchings <ben@decadent.org.uk> +Date: Tue, 17 Jan 2012 04:06:18 +0000 +Subject: kernel.h: add printk_ratelimited and pr_<level>_rl +To: stable@vger.kernel.org +Cc: Paolo Bonzini <pbonzini@redhat.com>, Linus Torvalds <torvalds@linux-foundation.org>, linux-kernel@vger.kernel.org, Petr Matousek <pmatouse@redhat.com>, linux-scsi@vger.kernel.org, Jens Axboe <axboe@kernel.dk>, James Bottomley <JBottomley@parallels.com> +Message-ID: <1326773178.2819.170.camel@deadeye> + + +From: Joe Perches <joe@perches.com> + +commit 8a64f336bc1d4aa203b138d29d5a9c414a9fbb47 upstream. + +Add a printk_ratelimited statement expression macro that uses a per-call +ratelimit_state so that multiple subsystems output messages are not +suppressed by a global __ratelimit state. + +[akpm@linux-foundation.org: coding-style fixes] +[akpm@linux-foundation.org: s/_rl/_ratelimited/g] +Signed-off-by: Joe Perches <joe@perches.com> +Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com> +Cc: Ingo Molnar <mingo@elte.hu> +Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> +Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + include/linux/kernel.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 44 insertions(+) + +--- a/include/linux/kernel.h ++++ b/include/linux/kernel.h +@@ -407,6 +407,50 @@ static inline char *pack_hex_byte(char * + #endif + + /* ++ * ratelimited messages with local ratelimit_state, ++ * no local ratelimit_state used in the !PRINTK case ++ */ ++#ifdef CONFIG_PRINTK ++#define printk_ratelimited(fmt, ...) ({ \ ++ static struct ratelimit_state _rs = { \ ++ .interval = DEFAULT_RATELIMIT_INTERVAL, \ ++ .burst = DEFAULT_RATELIMIT_BURST, \ ++ }; \ ++ \ ++ if (!__ratelimit(&_rs)) \ ++ printk(fmt, ##__VA_ARGS__); \ ++}) ++#else ++/* No effect, but we still get type checking even in the !PRINTK case: */ ++#define printk_ratelimited printk ++#endif ++ ++#define pr_emerg_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) ++#define pr_alert_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) ++#define pr_crit_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) ++#define pr_err_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ++#define pr_warning_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ++#define pr_notice_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ++#define pr_info_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ++/* no pr_cont_ratelimited, don't do that... */ ++/* If you are writing a driver, please use dev_dbg instead */ ++#if defined(DEBUG) ++#define pr_debug_ratelimited(fmt, ...) \ ++ printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ++#else ++#define pr_debug_ratelimited(fmt, ...) \ ++ ({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \ ++ ##__VA_ARGS__); 0; }) ++#endif ++ ++/* + * General tracing related utility functions - trace_printk(), + * tracing_on/tracing_off and tracing_start()/tracing_stop + * diff --git a/queue-2.6.32/series b/queue-2.6.32/series index f5a901f..b81eb1d 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -20,3 +20,4 @@ usb-cdc-wdm-fix-misuse-of-logical-operation-in-place-of-bitop.patch fix-cputime-overflow-in-uptime_proc_show.patch usb-fix-bad-dma-problem-on-wdm-device-disconnect.patch block-add-and-use-scsi_blk_cmd_ioctl.patch +kernel.h-add-printk_ratelimited-and-pr_-level-_rl.patch |