Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1329720 > unrolled thread
| Started by | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| First post | 2016-02-09 01:10 +0100 |
| Last post | 2016-02-09 01:10 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3.2 50/87] cifs: Ratelimit kernel log messages Ben Hutchings <ben@decadent.org.uk> - 2016-02-09 01:10 +0100
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2016-02-09 01:10 +0100 |
| Subject | [PATCH 3.2 50/87] cifs: Ratelimit kernel log messages |
| Message-ID | <r042t-4h1-3@gated-at.bofh.it> |
3.2.77-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jamie Bainbridge <jamie.bainbridge@gmail.com>
commit ec7147a99e33a9e4abad6fc6e1b40d15df045d53 upstream.
Under some conditions, CIFS can repeatedly call the cifs_dbg() logging
wrapper. If done rapidly enough, the console framebuffer can softlockup
or "rcu_sched self-detected stall". Apply the built-in log ratelimiters
to prevent such hangs.
Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.2:
- cifs_dbg() and cifs_vfs_err() do not exist, but make similar changes
to cifsfyi(), cifswarn() and cifserror()]
- Include <linux/ratelimit.h> explicitly]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/cifs/cifs_debug.c | 2 +-
fs/cifs/cifs_debug.h | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
--- a/fs/cifs/cifs_debug.h
+++ b/fs/cifs/cifs_debug.h
@@ -23,6 +23,8 @@
#ifndef _H_CIFS_DEBUG
#define _H_CIFS_DEBUG
+#include <linux/ratelimit.h>
+
void cifs_dump_mem(char *label, void *data, int length);
#ifdef CONFIG_CIFS_DEBUG2
#define DBG2 2
@@ -48,7 +50,7 @@ extern int cifsFYI;
#define cifsfyi(fmt, arg...) \
do { \
if (cifsFYI & CIFS_INFO) \
- printk(KERN_DEBUG "%s: " fmt "\n", __FILE__, ##arg); \
+ pr_debug_ratelimited("%s: " fmt "\n", __FILE__, ##arg); \
} while (0)
#define cFYI(set, fmt, arg...) \
@@ -58,7 +60,7 @@ do { \
} while (0)
#define cifswarn(fmt, arg...) \
- printk(KERN_WARNING fmt "\n", ##arg)
+ pr_warn_ratelimited(fmt "\n", ##arg)
/* debug event message: */
extern int cifsERROR;
@@ -73,7 +75,7 @@ do { \
#define cifserror(fmt, arg...) \
do { \
if (cifsERROR) \
- printk(KERN_ERR "CIFS VFS: " fmt "\n", ##arg); \
+ pr_err_ratelimited("CIFS VFS: " fmt "\n", ##arg); \
} while (0)
#define cERROR(set, fmt, arg...) \
Back to top | Article view | linux.kernel
csiph-web