diff options
| author | Jean-Baptiste Maneyrol <[email protected]> | 2014-11-19 16:46:37 +0000 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2014-11-25 14:24:54 +0000 |
| commit | 6296f4a8eb86f9abcc370fb7a1a116b8441c17fd (patch) | |
| tree | bea704c7efa5eda1c5ca33271b44e7a4d34df272 /drivers/net/xen-netback/interface.c | |
| parent | HID: i2c-hid: print the correct data in dbg msg (diff) | |
| download | kernel-6296f4a8eb86f9abcc370fb7a1a116b8441c17fd.tar.gz kernel-6296f4a8eb86f9abcc370fb7a1a116b8441c17fd.zip | |
HID: i2c-hid: fix race condition reading reports
Current driver uses a common buffer for reading reports either
synchronously in i2c_hid_get_raw_report() and asynchronously in
the interrupt handler.
There is race condition if an interrupt arrives immediately after
the report is received in i2c_hid_get_raw_report(); the common
buffer is modified by the interrupt handler with the new report
and then i2c_hid_get_raw_report() proceed using wrong data.
Fix it by using a separate buffers for synchronous reports.
Signed-off-by: Jean-Baptiste Maneyrol <[email protected]>
[Antonio Borneo: cleanup, rebase to v3.17, submit mainline]
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Cc: [email protected]
Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
