summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifs_debug.h
diff options
context:
space:
mode:
authorJamie Bainbridge2015-11-07 13:13:49 +0100
committerSteve French2016-01-14 20:39:02 +0100
commitec7147a99e33a9e4abad6fc6e1b40d15df045d53 (patch)
tree0bb16e11803e1136004e2077161ad65861f537bb /fs/cifs/cifs_debug.h
parentMerge tag 'xfs-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
downloadkernel-qcow2-linux-ec7147a99e33a9e4abad6fc6e1b40d15df045d53.tar.gz
kernel-qcow2-linux-ec7147a99e33a9e4abad6fc6e1b40d15df045d53.tar.xz
kernel-qcow2-linux-ec7147a99e33a9e4abad6fc6e1b40d15df045d53.zip
cifs: Ratelimit kernel log messages
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> CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs/cifs_debug.h')
-rw-r--r--fs/cifs/cifs_debug.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
index f40fbaca1b2a..66cf0f9fff89 100644
--- a/fs/cifs/cifs_debug.h
+++ b/fs/cifs/cifs_debug.h
@@ -51,14 +51,13 @@ __printf(1, 2) void cifs_vfs_err(const char *fmt, ...);
/* information message: e.g., configuration, major event */
#define cifs_dbg(type, fmt, ...) \
do { \
- if (type == FYI) { \
- if (cifsFYI & CIFS_INFO) { \
- pr_debug("%s: " fmt, __FILE__, ##__VA_ARGS__); \
- } \
+ if (type == FYI && cifsFYI & CIFS_INFO) { \
+ pr_debug_ratelimited("%s: " \
+ fmt, __FILE__, ##__VA_ARGS__); \
} else if (type == VFS) { \
cifs_vfs_err(fmt, ##__VA_ARGS__); \
} else if (type == NOISY && type != 0) { \
- pr_debug(fmt, ##__VA_ARGS__); \
+ pr_debug_ratelimited(fmt, ##__VA_ARGS__); \
} \
} while (0)