From: Jiri Slaby <jirislaby@gmail.com>
To: Dave Young <hidave.darkstar@gmail.com>
Cc: Jiri Slaby <jslaby@suse.cz>, Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Greg KH <gregkh@suse.de>
Subject: Re: WARNING: at drivers/tty/tty_ldisc.c:766 tty_ldisc_reinit+0x52/0x90() [3.0]
Date: Mon, 17 Oct 2011 22:40:34 +0200 [thread overview]
Message-ID: <4E9C92C2.6000505@gmail.com> (raw)
In-Reply-To: <CABqxG0c0wiaSXrLKCYc8Ef+uXEwkp=nuG+7-+pLoEEURkkDt=Q@mail.gmail.com>
On 10/09/2011 08:59 AM, Dave Young wrote:
> On Fri, Sep 2, 2011 at 4:59 AM, Jiri Slaby <jslaby@suse.cz> wrote:
>> On 08/28/2011 03:15 PM, Dave Jones wrote:
>>>
>>> Just saw this on a box that was recieving an rsync while I ssh'd in.
>>> The ssh session hung.
>>
>> Yes, could you apply the attached debug patch and post a dmesg output?
>
> I see this problem as well, the debug patch reports the refcount is 2
>
> You can produce the WARN as below:
> in xterm run:
>
> exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
Thanks for the info. I suppose your console is something where also some
getty runs. Then the warning is perfectly OK. And with the hunk below
constifying timing, I guess your system dies after the 5s timeout of
tty_ldisc_wait_idle. (You don't need to test the patch, just confirm
there is a getty running on the console.)
So actually I'm not sure what we should do there to not die. Perhaps
wait infinitely? Because the user wants to steal a terminal?
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -49,6 +49,7 @@
#include <linux/file.h>
#include <linux/uaccess.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <asm/system.h>
@@ -1575,6 +1576,7 @@ static int n_tty_open(struct tty_struct *tty)
/* These are ugly. Currently a malloc failure here can panic */
if (!tty->read_buf) {
+ msleep(100);
tty->read_buf = kzalloc(N_TTY_BUF_SIZE, GFP_KERNEL);
if (!tty->read_buf)
return -ENOMEM;
@@ -1815,6 +1817,7 @@ do_it_again:
/* FIXME: does n_tty_set_room need locking ? */
n_tty_set_room(tty);
timeout = schedule_timeout(timeout);
+ msleep(20);
BUG_ON(!tty->read_buf);
continue;
}
thanks,
--
js
next prev parent reply other threads:[~2011-10-17 20:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-28 13:15 WARNING: at drivers/tty/tty_ldisc.c:766 tty_ldisc_reinit+0x52/0x90() [3.0] Dave Jones
2011-09-01 20:59 ` Jiri Slaby
2011-10-09 6:59 ` Dave Young
2011-10-17 20:40 ` Jiri Slaby [this message]
2011-10-18 1:25 ` Dave Young
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=4E9C92C2.6000505@gmail.com \
--to=jirislaby@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davej@redhat.com \
--cc=gregkh@suse.de \
--cc=hidave.darkstar@gmail.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