Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-19 Thread Antonio Borneo
Hi Benjamin, On Tue, Nov 18, 2014 at 5:43 AM, Benjamin Tissoires wrote: > Hey Antonio, > > On Nov 16 2014 or thereabouts, Antonio Borneo wrote: >> From: Jean-Baptiste Maneyrol >> >> From: Jean-Baptiste Maneyrol >> >> Current driver uses a common buffer for reading reports either >>

Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-19 Thread Antonio Borneo
Hi Benjamin, On Tue, Nov 18, 2014 at 5:43 AM, Benjamin Tissoires benjamin.tissoi...@redhat.com wrote: Hey Antonio, On Nov 16 2014 or thereabouts, Antonio Borneo wrote: From: Jean-Baptiste Maneyrol jmaney...@invensense.com From: Jean-Baptiste Maneyrol jmaney...@invensense.com Current

Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-17 Thread Benjamin Tissoires
On Nov 17 2014 or thereabouts, Greg KH wrote: > On Mon, Nov 17, 2014 at 04:43:05PM -0500, Benjamin Tissoires wrote: > > Hey Antonio, > > > > On Nov 16 2014 or thereabouts, Antonio Borneo wrote: > > > From: Jean-Baptiste Maneyrol > > > > > > From: Jean-Baptiste Maneyrol > > > > > > Current

Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-17 Thread Greg KH
On Mon, Nov 17, 2014 at 04:43:05PM -0500, Benjamin Tissoires wrote: > Hey Antonio, > > On Nov 16 2014 or thereabouts, Antonio Borneo wrote: > > From: Jean-Baptiste Maneyrol > > > > From: Jean-Baptiste Maneyrol > > > > Current driver uses a common buffer for reading reports either > >

Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-17 Thread Benjamin Tissoires
Hey Antonio, On Nov 16 2014 or thereabouts, Antonio Borneo wrote: > From: Jean-Baptiste Maneyrol > > From: Jean-Baptiste Maneyrol > > Current driver uses a common buffer for reading reports either > synchronously in i2c_hid_get_raw_report() and asynchronously in > the interrupt handler. >

Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-17 Thread Benjamin Tissoires
Hey Antonio, On Nov 16 2014 or thereabouts, Antonio Borneo wrote: From: Jean-Baptiste Maneyrol jmaney...@invensense.com From: Jean-Baptiste Maneyrol jmaney...@invensense.com Current driver uses a common buffer for reading reports either synchronously in i2c_hid_get_raw_report() and

Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-17 Thread Greg KH
On Mon, Nov 17, 2014 at 04:43:05PM -0500, Benjamin Tissoires wrote: Hey Antonio, On Nov 16 2014 or thereabouts, Antonio Borneo wrote: From: Jean-Baptiste Maneyrol jmaney...@invensense.com From: Jean-Baptiste Maneyrol jmaney...@invensense.com Current driver uses a common buffer for

Re: [PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-17 Thread Benjamin Tissoires
On Nov 17 2014 or thereabouts, Greg KH wrote: On Mon, Nov 17, 2014 at 04:43:05PM -0500, Benjamin Tissoires wrote: Hey Antonio, On Nov 16 2014 or thereabouts, Antonio Borneo wrote: From: Jean-Baptiste Maneyrol jmaney...@invensense.com From: Jean-Baptiste Maneyrol

[PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-16 Thread Antonio Borneo
From: Jean-Baptiste Maneyrol From: Jean-Baptiste Maneyrol 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

[PATCH] HID: i2c-hid: fix race condition reading reports

2014-11-16 Thread Antonio Borneo
From: Jean-Baptiste Maneyrol jmaney...@invensense.com From: Jean-Baptiste Maneyrol jmaney...@invensense.com 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