lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 08 Oct 2007 12:26:39 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Paul Hardwick <p.hardwick@...ion.com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: nozomi: ERESTARTSYS to userspace?

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ