From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Borislav Petkov <bp@amd64.org>, Jiri Slaby <jslaby@suse.cz>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
LKML <linux-kernel@vger.kernel.org>,
Joe Perches <joe@perches.com>
Subject: Re: [PATCH] Fix bogus "callbacks suppressed" messages
Date: Fri, 5 Oct 2012 17:28:31 +0200 [thread overview]
Message-ID: <20121005152831.GA245@x4> (raw)
In-Reply-To: <20121005142639.GA20065@kroah.com>
On 2012.10.05 at 07:26 -0700, Greg Kroah-Hartman wrote:
> On Fri, Oct 05, 2012 at 02:57:17PM +0200, Markus Trippelsdorf wrote:
> > On the current git tree one sees messages such as:
> > tty_init_dev: 24 callbacks suppressed
> > tty_init_dev: 3 callbacks suppressed
> >
> > To fix this we need to look at condition before calling __ratelimit in
> > the WARN_RATELIMIT macro. While at it remove the superfluous
> > __WARN_RATELIMIT macros.
> >
> > Original patch is from Joe Perches and Jiri Slaby.
> >
> > Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
> > Acked-and-tested-by: Borislav Petkov <borislav.petkov@amd.com>
> > ---
> > include/linux/ratelimit.h | 27 +++++++++------------------
> > 1 file changed, 9 insertions(+), 18 deletions(-)
>
> I don't have a problem with this patch, but I don't understand why it's
> now showing up. There haven't been any changes in the ratelimit.h area
> recently that I can see, so why is this change needed now? What is in
> the tty layer that is causing this, just the fact that it's actually
> being used now?
See Jiri's recent commit:
commit 5d4121c04b3577e37e389b3553d442f44bb346d7
Author: Jiri Slaby <jslaby@suse.cz>
Date: Fri Aug 17 14:27:52 2012 +0200
TTY: check if tty->port is assigned
And if not, complain loudly. None in-kernel module should trigger
that, but let us find out for sure. On the other hand, all the
out-of-tree modules will hit that. Give them some time (maybe one
release) to catch up.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 28c3e86..41e42f1 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1415,6 +1415,10 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
if (!tty->port)
tty->port = driver->ports[idx];
+ WARN_RATELIMIT(!tty->port,
+ "%s: %s driver does not set tty->port. This will crash the kernel later. Fix the driver!\n",
+ __func__, tty->driver->name);
+
/*
* Structures all installed ... call the ldisc open routines.
* If we fail here just call release_tty to clean up. No need
--
Markus
next prev parent reply other threads:[~2012-10-05 15:28 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
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 [this message]
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=20121005152831.GA245@x4 \
--to=markus@trippelsdorf.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bp@amd64.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).