mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Paul Hardwick <p.hardwick@option.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: nozomi: ERESTARTSYS to userspace?
Date: Mon, 08 Oct 2007 12:26:39 +0200	[thread overview]
Message-ID: <470A05DF.5080405@gmail.com> (raw)

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

             reply	other threads:[~2007-10-08 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-08 10:26 Jiri Slaby [this message]
2007-10-08 12:02 ` Alan Cox

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=470A05DF.5080405@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.hardwick@option.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

all inboxes | Powered by JetHome®