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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 05 Oct 2015 10:06:24 -0400
From:	Stephen Chandler Paul <cpaul@...hat.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	David Herrmann <dh.herrmann@...il.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-input@...r.kernel.org, linux-api@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Greg KH <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>, Joe Perches <joe@...ches.com>,
	Jiri Slaby <jslaby@...e.com>,
	Vishnu Patekar <vishnupatekar0510@...il.com>,
	Sebastian Ott <sebott@...ux.vnet.ibm.com>,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>,
	Hans de Goede <hdegoede@...hat.com>,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH v6.1 1/1] Input: Add userio module

On Fri, 2015-10-02 at 10:37 -0700, Dmitry Torokhov wrote:
> On Wed, Sep 23, 2015 at 01:54:59PM -0400, cpaul@...hat.com wrote:
> > +static int userio_device_write(struct serio *id, unsigned char
> > val)
> > +{
> > +	struct userio_device *userio = id->port_data;
> > +	unsigned long flags;
> > +
> > +	if (!userio)
> > +		return -1;
> 
> I still have the same question: how can this happen? Where do we
> reset
> port data to NULL? What happens if we set to NULL after checking?
> 

Actually David pointed out this line was not needed, somehow it still
got left in the patch. I'll send an updated version in just a minute
with the changes.

Cheers,
	Lyude
> > +
> > +	spin_lock_irqsave(&userio->buf_lock, flags);
> > +
> > +	userio->buf[userio->head] = val;
> > +	userio->head = (userio->head + 1) % USERIO_BUFSIZE;
> > +
> > +	if (userio->head == userio->tail)
> > +		dev_warn(userio_misc.this_device,
> > +			 "Buffer overflowed, userio client isn't
> > keeping up");
> > +
> > +	spin_unlock_irqrestore(&userio->buf_lock, flags);
> > +
> > +	wake_up_interruptible(&userio->waitq);
> > +
> > +	return 0;
> > +}
> 
> Thanks.
> 
--
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