Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Regression! kern/t_pty fails - cannot set pty's queue size



On Fri, 17 Aug 2012, Paul Goyette wrote:

Some time between 10:20:07 and 15:50:06 UTC on 2012-08-12, the pty_queue test case for kern/t_pty has been failing. The error appears to be an EBUSY return from "ioctl(fd, TIOCSQSIZE, &opt)". This worked correctly in prior test runs, but has been failing consistently since Aug 12.

This would appear to be a result of the following commit:

        Module Name:    src
        Committed By:   christos
        Date:           Sun Aug 12 14:45:45 UTC 2012

        Modified Files:
                src/sys/kern: tty.c

        Log Message:
        PR/46780: Dennis Ferguson: Take the easy way out and return EBUSY
        when changing the queue size if the output queue is not empty.
        Other solutions seemed too complex/fragile.

Perhaps the "output queue not empty" check isn't working?

The code in question:

        static int
        tty_set_qsize(struct tty *tp, int newsize)
        {
                struct clist rawq, canq, outq;
                struct clist orawq, ocanq, ooutq;

                if (outq.c_cc != 0)
                        return EBUSY;
        ...

It is definitely not obvious to me how outq.c_cc can have any useful value at this point - outq has only just been allocated on the stack.



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index