LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] viocons: BKL locking
@ 2008-02-20 20:32 Alan Cox
  2008-02-21  3:58 ` Paul Mackerras
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2008-02-20 20:32 UTC (permalink / raw)
  To: akpm, linux-kernel

For some weird reason I can't ascertain (translation "I think its
broken") the viocons driver calls directly into the n_tty ldisc code even
if another ldisc is in use. It'll probably break if you do that but I'm
just fixing the locking and adding a comment that its horked.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-rc2-mm1/drivers/char/viocons.c linux-2.6.25-rc2-mm1/drivers/char/viocons.c
--- linux.vanilla-2.6.25-rc2-mm1/drivers/char/viocons.c	2008-02-19 11:01:44.000000000 +0000
+++ linux-2.6.25-rc2-mm1/drivers/char/viocons.c	2008-02-20 11:49:24.000000000 +0000
@@ -704,8 +704,11 @@
 	case KDSKBLED:
 		return 0;
 	}
-
-	return n_tty_ioctl(tty, file, cmd, arg);
+	/* FIXME: WTF is this being called for ??? */
+	lock_kernel();
+	ret =  n_tty_ioctl(tty, file, cmd, arg);
+	unlock_kernel();
+	return ret;
 }
 
 /*

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] viocons: BKL locking
  2008-02-20 20:32 [PATCH] viocons: BKL locking Alan Cox
@ 2008-02-21  3:58 ` Paul Mackerras
  2008-02-21 10:50   ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Mackerras @ 2008-02-21  3:58 UTC (permalink / raw)
  To: Alan Cox; +Cc: akpm, linux-kernel, sfr

Alan Cox writes:

> For some weird reason I can't ascertain (translation "I think its
> broken") the viocons driver calls directly into the n_tty ldisc code even
> if another ldisc is in use. It'll probably break if you do that but I'm
> just fixing the locking and adding a comment that its horked.

Looks to me like it (viotty_ioctl) should return -ENOIOCTLCMD instead
of calling n_tty_ioctl -- do you agree?

Paul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] viocons: BKL locking
  2008-02-21  3:58 ` Paul Mackerras
@ 2008-02-21 10:50   ` Alan Cox
  2008-02-21 11:10     ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2008-02-21 10:50 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: akpm, linux-kernel, sfr

On Thu, 21 Feb 2008 14:58:29 +1100
Paul Mackerras <paulus@samba.org> wrote:

> Alan Cox writes:
> 
> > For some weird reason I can't ascertain (translation "I think its
> > broken") the viocons driver calls directly into the n_tty ldisc code even
> > if another ldisc is in use. It'll probably break if you do that but I'm
> > just fixing the locking and adding a comment that its horked.
> 
> Looks to me like it (viotty_ioctl) should return -ENOIOCTLCMD instead
> of calling n_tty_ioctl -- do you agree?

I think that is probably what is intended. That would then bounce back
throuh the tty layer to the right places.

Alan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] viocons: BKL locking
  2008-02-21 10:50   ` Alan Cox
@ 2008-02-21 11:10     ` Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2008-02-21 11:10 UTC (permalink / raw)
  To: Alan Cox; +Cc: Paul Mackerras, akpm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]

Hi Alan,

On Thu, 21 Feb 2008 10:50:56 +0000 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> On Thu, 21 Feb 2008 14:58:29 +1100
> Paul Mackerras <paulus@samba.org> wrote:
> 
> > Alan Cox writes:
> > 
> > > For some weird reason I can't ascertain (translation "I think its
> > > broken") the viocons driver calls directly into the n_tty ldisc code even
> > > if another ldisc is in use. It'll probably break if you do that but I'm
> > > just fixing the locking and adding a comment that its horked.
> > 
> > Looks to me like it (viotty_ioctl) should return -ENOIOCTLCMD instead
> > of calling n_tty_ioctl -- do you agree?
> 
> I think that is probably what is intended. That would then bounce back
> throuh the tty layer to the right places.

The other thing to note is that viocons is deprecated (we wrote another
backend to hvc as an alternative console for legacy iSeries) and will
hopefully be removed sometime soon so don't spend any time on it.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-21 11:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-20 20:32 [PATCH] viocons: BKL locking Alan Cox
2008-02-21  3:58 ` Paul Mackerras
2008-02-21 10:50   ` Alan Cox
2008-02-21 11:10     ` Stephen Rothwell

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