From: Paul Fulghum <paulkf@microgate.com>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Nicolas Mailhot <nicolas.mailhot@laposte.net>,
Randy Dunlap <randy.dunlap@oracle.com>,
"bugme-daemon@kernel-bugs.osdl.org"
<bugme-daemon@bugzilla.kernel.org>,
linux-kernel@vger.kernel.org, Mel Gorman <mel@csn.ul.ie>,
Christoph Lameter <clameter@sgi.com>
Subject: Re: [Bug 8473] New: Oops: 0010 [1] SMP
Date: Fri, 08 Jun 2007 10:16:49 -0500 [thread overview]
Message-ID: <1181315809.4811.5.camel@x2.microgate.com> (raw)
In-Reply-To: <20070608030629.GA18493@atjola.homenet>
On Fri, 2007-06-08 at 05:06 +0200, Björn Steinbrink wrote:
> This is do_tty_hangup() exchanging the fops while we're waiting for the
> lock. The new fops (hung_up_tty_fops) only have the unlocked variant and
> thus we Oops our way.
>
> The following program reproduces it quite easily on a SMP box. I'm
> running it from X as root like this:
> while true; do xterm /path/to/program; done
I am unable to reproduce the oops on either i386 SMP or x86_64 SMP
using your test program. This is against plain 2.6.21 with only
my compat ioctl patch applied.
Here is a patch that restores the locked ioctl for hung_up_tty_ioctl.
Can you try it and see if it removes your oops?
--- a/drivers/char/tty_io.c 2007-06-08 10:07:39.000000000 -0500
+++ b/drivers/char/tty_io.c 2007-06-08 10:09:59.000000000 -0500
@@ -1150,8 +1150,14 @@ static unsigned int hung_up_tty_poll(str
return POLLIN | POLLOUT | POLLERR | POLLHUP | POLLRDNORM | POLLWRNORM;
}
-static long hung_up_tty_ioctl(struct file * file,
- unsigned int cmd, unsigned long arg)
+static int hung_up_tty_ioctl(struct inode * inode, struct file * file,
+ unsigned int cmd, unsigned long arg)
+{
+ return cmd == TIOCSPGRP ? -ENOTTY : -EIO;
+}
+
+static long hung_up_tty_compat_ioctl(struct file * file,
+ unsigned int cmd, unsigned long arg)
{
return cmd == TIOCSPGRP ? -ENOTTY : -EIO;
}
@@ -1199,8 +1205,8 @@ static const struct file_operations hung
.read = hung_up_tty_read,
.write = hung_up_tty_write,
.poll = hung_up_tty_poll,
- .unlocked_ioctl = hung_up_tty_ioctl,
- .compat_ioctl = hung_up_tty_ioctl,
+ .ioctl = hung_up_tty_ioctl,
+ .compat_ioctl = hung_up_tty_compat_ioctl,
.release = tty_release,
};
next prev parent reply other threads:[~2007-06-08 15:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200705132102.l4DL2onF003014@fire-2.osdl.org>
2007-05-13 22:47 ` [Bug 8473] New: Oops: 0010 [1] SMP Andrew Morton
2007-05-13 23:25 ` Nicolas Mailhot
2007-05-17 10:00 ` Nicolas Mailhot
2007-05-17 16:45 ` Randy Dunlap
2007-05-17 16:59 ` Nicolas Mailhot
2007-05-26 19:10 ` Nicolas Mailhot
2007-06-08 3:06 ` Björn Steinbrink
2007-06-08 3:16 ` Andrew Morton
2007-06-08 14:10 ` Paul Fulghum
2007-06-08 15:16 ` Paul Fulghum [this message]
2007-06-08 19:20 ` Paul Fulghum
2007-06-08 19:33 ` Andrew Morton
2007-06-08 20:34 ` [PATCH] tty restore locked ioctl file op Paul Fulghum
2007-06-09 18:18 ` Björn Steinbrink
2007-06-09 21:52 ` Paul Fulghum
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=1181315809.4811.5.camel@x2.microgate.com \
--to=paulkf@microgate.com \
--cc=B.Steinbrink@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arnd@arndb.de \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=nicolas.mailhot@laposte.net \
--cc=randy.dunlap@oracle.com \
/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