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] [day] [month] [year] [list]
Date:	Tue, 16 Feb 2010 09:30:10 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Jiri Slaby <jslaby@...e.cz>
Cc:	mchehab@...hat.com, linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org, jirislaby@...il.com,
	Mauro Carvalho Chehab <mchehab@...radead.org>
Subject: Re: [PATCH] V4L: dvb-usb, add extra sync to down-up input events

Hi Jiri,

On Sun, Feb 14, 2010 at 09:36:25PM +0100, Jiri Slaby wrote:
> Userspace is allowed to coalesce events between SYNCs. And since the code
> emits UP right after DOWN for the same key, it may be missed
> (up+down=nothing). Add an extra sync in between UP and DOWN events to disable
> the coalesce.
> 
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>

Looks good.

Acked-by: Dmitry Torokhov <dtor@...l.ru>

> Cc: Mauro Carvalho Chehab <mchehab@...radead.org>
> Cc: linux-media@...r.kernel.org
> ---
>  drivers/media/dvb/dvb-usb/dib0700_core.c   |    1 +
>  drivers/media/dvb/dvb-usb/dvb-usb-remote.c |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
> index 4450214..4f961d2 100644
> --- a/drivers/media/dvb/dvb-usb/dib0700_core.c
> +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
> @@ -612,6 +612,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
>  	case REMOTE_KEY_REPEAT:
>  		deb_info("key repeated\n");
>  		input_event(d->rc_input_dev, EV_KEY, event, 1);
> +		input_sync(d->rc_input_dev);
>  		input_event(d->rc_input_dev, EV_KEY, d->last_event, 0);
>  		input_sync(d->rc_input_dev);
>  		break;
> diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
> index 6b5ded9..a03ef7e 100644
> --- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
> +++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
> @@ -107,6 +107,7 @@ static void dvb_usb_read_remote_control(struct work_struct *work)
>  		case REMOTE_KEY_REPEAT:
>  			deb_rc("key repeated\n");
>  			input_event(d->rc_input_dev, EV_KEY, event, 1);
> +			input_sync(d->rc_input_dev);
>  			input_event(d->rc_input_dev, EV_KEY, d->last_event, 0);
>  			input_sync(d->rc_input_dev);
>  			break;
> -- 
> 1.6.6.1
> 

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