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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100204184132.GD10965@core.coreip.homeip.net>
Date:	Thu, 4 Feb 2010 10:41:32 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	Jiri Kosina <jkosina@...e.cz>, Antti Palosaari <crope@....fi>,
	mchehab@...radead.org, linux-kernel@...r.kernel.org,
	Mauro Carvalho Chehab <mchehab@...hat.com>,
	linux-media@...r.kernel.org, Pekka Sarnila <sarnila@...t.fi>,
	linux-input@...r.kernel.org
Subject: Re: [PATCH 1/1] media: dvb-usb/af9015, fix disconnection crashes

On Thu, Feb 04, 2010 at 07:33:22PM +0100, Jiri Slaby wrote:
> On 02/04/2010 07:14 PM, Dmitry Torokhov wrote:
> > On Thu, Feb 04, 2010 at 11:31:45AM +0100, Jiri Slaby wrote:
> >  +
> >> +static int dvb_event(struct hid_device *hdev, struct hid_field *field,
> >> +		struct hid_usage *usage, __s32 value)
> >> +{
> >> +	/* we won't get a "key up" event */
> >> +	if (value) {
> >> +		input_event(field->hidinput->input, usage->type, usage->code, 1);
> >> +		input_event(field->hidinput->input, usage->type, usage->code, 0);
> > 
> > Do not ever forget input_sync(), you need 2 of them here.
> > 
> > With the latest changes to evdev, if you are using SIGIO you won't get
> > wioken up until EV_SYN/SYN_REPORT.
> 
> HID layer syncs on its own. So the second is not needed. Why is needed
> the first?
> 

Userpsace has a right to accumulate events and only act on them when
receiving EV_SYN. Press + release in the same event block may be treated
as no change. The same as REL_X +2, REL_X -2 - no need to move pointer at
all. And so on.

> I.e. should there be one also in dvb_usb_read_remote_control?

Probably, I have not looked.

-- 
Dmitry
--
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