All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Borislav Petkov <bp@amd64.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: tty_init_dev: 24 callbacks suppressed
Date: Thu, 4 Oct 2012 13:23:47 +0200	[thread overview]
Message-ID: <20121004112347.GA245@x4> (raw)
In-Reply-To: <20121004092055.GA21028@aftab.osrc.amd.com>

On 2012.10.04 at 11:20 +0200, Borislav Petkov wrote:
> Hi,
> 
> I'm seeing this on today's Linus tree:
> 
> [   24.048278] tty_init_dev: 24 callbacks suppressed
> [   45.630349] tty_init_dev: 3 callbacks suppressed
> 
> It is either from that WARN_RATELIMIT thing or the printk_ratelimited
> further below in tty_init_dev but I don't know for sure because the
> actual text message from both printk's doesn't come out in dmesg - only
> that something got suppressed.
> 
> And it quiets down later, after the machine has finished booting. Still,
> this doesn't tell me anything about any issue. So what's up?

I'm seeing the same thing.
This can be fixed by a slightly modified version of:
https://patchwork.kernel.org/patch/1339221/


diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
index e11ccb4..2d02461 100644
--- a/include/linux/ratelimit.h
+++ b/include/linux/ratelimit.h
@@ -46,20 +46,17 @@ extern int ___ratelimit(struct ratelimit_state *rs, const char *func);
 #define WARN_ON_RATELIMIT(condition, state)			\
 		WARN_ON((condition) && __ratelimit(state))
 
-#define __WARN_RATELIMIT(condition, state, format...)		\
-({								\
-	int rtn = 0;						\
-	if (unlikely(__ratelimit(state)))			\
-		rtn = WARN(condition, format);			\
-	rtn;							\
-})
-
-#define WARN_RATELIMIT(condition, format...)			\
+#define WARN_RATELIMIT(condition, state, fmt, ...)			\
 ({								\
 	static DEFINE_RATELIMIT_STATE(_rs,			\
 				      DEFAULT_RATELIMIT_INTERVAL,	\
 				      DEFAULT_RATELIMIT_BURST);	\
-	__WARN_RATELIMIT(condition, &_rs, format);		\
+	int rtn = !!(condition);				\
+								\
+	if (unlikely(rtn && __ratelimit(state)))		\
+		WARN(rtn, fmt, ##__VA_ARGS__);			\
+								\
+	rtn;							\
 })
 
 #else
@@ -67,15 +64,9 @@ extern int ___ratelimit(struct ratelimit_state *rs, const char *func);
 #define WARN_ON_RATELIMIT(condition, state)			\
 	WARN_ON(condition)
 
-#define __WARN_RATELIMIT(condition, state, format...)		\
-({								\
-	int rtn = WARN(condition, format);			\
-	rtn;							\
-})
-
-#define WARN_RATELIMIT(condition, format...)			\
+#define WARN_RATELIMIT(condition, fmt, ...)			\
 ({								\
-	int rtn = WARN(condition, format);			\
+	int rtn = WARN(condition, fmt, ##__VA_ARGS__);		\
 	rtn;							\
 })
 
-- 
Markus

  reply	other threads:[~2012-10-04 11:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04  9:20 tty_init_dev: 24 callbacks suppressed Borislav Petkov
2012-10-04 11:23 ` Markus Trippelsdorf [this message]
2012-10-04 11:51   ` Markus Trippelsdorf
2012-10-04 12:40     ` Borislav Petkov
2012-10-04 13:11       ` Markus Trippelsdorf
2012-10-05 11:17         ` Jiri Slaby
2012-10-05 11:25           ` Alan Cox
2012-10-05 12:27           ` Borislav Petkov
2012-10-05 12:57             ` [PATCH] Fix bogus "callbacks suppressed" messages Markus Trippelsdorf
2012-10-05 14:26               ` Greg Kroah-Hartman
2012-10-05 15:28                 ` Markus Trippelsdorf
2012-10-05 15:29                 ` Borislav Petkov
2012-10-05 15:37                   ` Greg Kroah-Hartman
2012-10-05 15:41                     ` Markus Trippelsdorf
2012-10-05 15:43                     ` Borislav Petkov
2012-10-05 15:48                       ` Markus Trippelsdorf
2012-10-05 16:03                         ` Borislav Petkov
2012-10-05 16:06                         ` Greg Kroah-Hartman
2012-10-05 18:06               ` Jiri Slaby
2012-10-05 15:33           ` tty_init_dev: 24 callbacks suppressed Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121004112347.GA245@x4 \
    --to=markus@trippelsdorf.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bp@amd64.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.