All of lore.kernel.org
 help / color / mirror / Atom feed
* nozomi: ERESTARTSYS to userspace?
@ 2007-10-08 10:26 Jiri Slaby
  2007-10-08 12:02 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2007-10-08 10:26 UTC (permalink / raw)
  To: Paul Hardwick; +Cc: Linux Kernel Mailing List

Hi,

static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
                      int count)
{
        int rval = -EINVAL;
        struct nozomi *dc = get_dc_by_tty(tty);
        struct port *port = (struct port *)tty->driver_data;
        unsigned long flags;

        /* DBG1( "WRITEx: %d, index = %d", count, index); */

        if (!dc || !port)
                return -ENODEV;

        if (unlikely(down_trylock(&port->tty_sem))) {
                /*
                 * must test lock as tty layer wraps calls
                 * to this function with BKL
                 */
                dev_err(&dc->pdev->dev, "Would have deadlocked - "
                        "return ERESTARTSYS\n");
                return -ERESTARTSYS;
        }

The use of ERESTARTSYS seems bogus to me, no signal is pending and this flag
would reach userspace (that is not permitted), am I right?

--js

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

end of thread, other threads:[~2007-10-08 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08 10:26 nozomi: ERESTARTSYS to userspace? Jiri Slaby
2007-10-08 12:02 ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.