[Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Mr. Dmitry and Linux Community,

I am Anshul Garg working on Linux Kernel from last 2 years .

I have one query regarding event filter mechanism in input subsystem.
Can you please help in answering my query as below:

=====================================================
In function input_pass_values in input.c file , input core sends all
events to each handler associated with

the input device ,

rcu_read_lock();

handle = rcu_dereference(dev->grab);
if (handle) {
count = input_to_handler(handle, vals, count);
} else {
list_for_each_entry_rcu(handle, &dev->h_list, d_node)
if (handle->open)
count = input_to_handler(handle, vals, count);
}

after this in input_to_handler function events are filtered and sent
to the handler.

for (v = vals; v != vals + count; v++) {
if (handler->filter &&
   handler->filter(handle, v->type, v->code, v->value))
continue;
if (end != v)
*end = *v;
end++;
}



But as per previous event filter mechanism all the events should be
parsed from all
handlers after that remaining events should be sent to handlers list.

And in comments also its mentioned as

/*
 * Pass event first through all filters and then, if event has not been
 * filtered out, through all open handles.*/

So current approach to filter events seems to be incorrect.

Please help to clarify my query.


I have prepared one patch with new event filter mechanism which will
first filter all events from attached handlers then pass the remaining
events after being filtered
through all handlers unlike current implementation.

Once My query is resolved , I will send the patch.


Thanks
Anshul Garg
+91-9899777351
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux