Re: [PATCH] viocons: BKL locking
Hi Alan, On Thu, 21 Feb 2008 10:50:56 + Alan Cox <[EMAIL PROTECTED]> wrote: > > On Thu, 21 Feb 2008 14:58:29 +1100 > Paul Mackerras <[EMAIL PROTECTED]> 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[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpqSqClAb8yl.pgp Description: PGP signature
Re: [PATCH] viocons: BKL locking
On Thu, 21 Feb 2008 14:58:29 +1100 Paul Mackerras <[EMAIL PROTECTED]> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] viocons: BKL locking
On Thu, 21 Feb 2008 14:58:29 +1100 Paul Mackerras [EMAIL PROTECTED] 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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] viocons: BKL locking
Hi Alan, On Thu, 21 Feb 2008 10:50:56 + Alan Cox [EMAIL PROTECTED] wrote: On Thu, 21 Feb 2008 14:58:29 +1100 Paul Mackerras [EMAIL PROTECTED] 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[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpqSqClAb8yl.pgp Description: PGP signature
Re: [PATCH] viocons: BKL locking
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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] viocons: BKL locking
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 <[EMAIL PROTECTED]> 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.0 + +++ linux-2.6.25-rc2-mm1/drivers/char/viocons.c 2008-02-20 11:49:24.0 + @@ -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; } /* -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] viocons: BKL locking
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 [EMAIL PROTECTED] 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.0 + +++ linux-2.6.25-rc2-mm1/drivers/char/viocons.c 2008-02-20 11:49:24.0 + @@ -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; } /* -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] viocons: BKL locking
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. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/