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:	Sun, 28 Jun 2009 23:19:55 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Trilok Soni <soni.trilok@...il.com>
Cc:	Daniel Ribeiro <drwyrm@...il.com>, linux-input@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	openezx-devel <openezx-devel@...ts.openezx.org>,
	Harald Welte <laforge@...monks.org>,
	Samuel Ortiz <sameo@...ux.intel.com>
Subject: Re: [PATCH] PCAP touchscreen driver (for 2.6.32)

On Sun, Jun 28, 2009 at 12:45:17PM +0530, Trilok Soni wrote:
> Hi Daniel,
> 
> 2009/6/27 Daniel Ribeiro <drwyrm@...il.com>:
> > +
> > +       err = request_irq(pcap_to_irq(pcap_ts->pcap, PCAP_IRQ_TS),
> > +                       pcap_ts_event_touch, 0, "Touch Screen", pcap_ts);
> > +       if (err)
> > +               goto fail;
> > +
> > +       err = input_register_device(pcap_ts->input);
> > +       if (err)
> > +               goto fail_touch;
> 
> Please move request_irq after input_register_device, as IRQ can get
> fired before input device gets available, right?
> 

Actually it is OK to have IRQs fired before the device is registered.
Input core guarantees that input device allocated with
input_allocate_device() will survive if events are sent through it. The
events will not be delivered anywhere, for obvious reason, but
everything else should be fine. In fact, if device has an event()
handler then it has to be fully operational (that includes IRQ reserved
and ready, unless the driver implements open/close methods) before
calling input_register_device - the handlers that will attach to the
device have every right to start sending events back to the device right
away and expect them to be handled properly.

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