cifs: Ratelimit kernel log messages
authorJamie Bainbridge <jamie.bainbridge@gmail.com>
Sat, 7 Nov 2015 12:13:49 +0000 (22:13 +1000)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 13 Feb 2016 10:34:09 +0000 (10:34 +0000)
commit4ed805d143fbc9d5f2026405d7090301fad67066
treefc754b59ee6bdd6e137e5acd81dd87dc54439abb
parent0f2ed5d5f58037e83b57a6dab9738a207eb75d96
cifs: Ratelimit kernel log messages

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.h