Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-08-19 Thread Benjamin Tissoires
Hi Jean, On Jul 29 2016 or thereabouts, Jean Delvare wrote: > Salut Benjamin, > > On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > > struct host_notify contains its own workqueue, so there is a race when > > the adapter gets removed: > > - the adapter schedules a notification > >

Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-08-19 Thread Benjamin Tissoires
Hi Jean, On Jul 29 2016 or thereabouts, Jean Delvare wrote: > Salut Benjamin, > > On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > > struct host_notify contains its own workqueue, so there is a race when > > the adapter gets removed: > > - the adapter schedules a notification > >

Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-08-01 Thread Jean Delvare
Hi Benjamin, On Fri, 29 Jul 2016 11:12:12 +0200, Jean Delvare wrote: > On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > > +static void i801_disable_host_notify(struct i2c_adapter *adapter) > > +{ > > + struct i801_priv *priv = i2c_get_adapdata(adapter); > > You pass the adapter

Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-08-01 Thread Jean Delvare
Hi Benjamin, On Fri, 29 Jul 2016 11:12:12 +0200, Jean Delvare wrote: > On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > > +static void i801_disable_host_notify(struct i2c_adapter *adapter) > > +{ > > + struct i801_priv *priv = i2c_get_adapdata(adapter); > > You pass the adapter

Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-07-29 Thread Benjamin Tissoires
Salut Jean, On Jul 29 2016 or thereabouts, Jean Delvare wrote: > Salut Benjamin, > > On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > > struct host_notify contains its own workqueue, so there is a race when > > the adapter gets removed: > > - the adapter schedules a notification >

Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-07-29 Thread Benjamin Tissoires
Salut Jean, On Jul 29 2016 or thereabouts, Jean Delvare wrote: > Salut Benjamin, > > On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > > struct host_notify contains its own workqueue, so there is a race when > > the adapter gets removed: > > - the adapter schedules a notification >

Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-07-29 Thread Jean Delvare
Salut Benjamin, On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > struct host_notify contains its own workqueue, so there is a race when > the adapter gets removed: > - the adapter schedules a notification > - the notification is on hold > - the adapter gets removed and all its

Re: [PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-07-29 Thread Jean Delvare
Salut Benjamin, On Thu, 28 Jul 2016 11:50:39 +0200, Benjamin Tissoires wrote: > struct host_notify contains its own workqueue, so there is a race when > the adapter gets removed: > - the adapter schedules a notification > - the notification is on hold > - the adapter gets removed and all its

[PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-07-28 Thread Benjamin Tissoires
struct host_notify contains its own workqueue, so there is a race when the adapter gets removed: - the adapter schedules a notification - the notification is on hold - the adapter gets removed and all its children too - the worker fires and access illegal memory Add an API to actually kill the

[PATCH 1/5] i2c: i2c-smbus: prevent races on remove when Host Notify is used

2016-07-28 Thread Benjamin Tissoires
struct host_notify contains its own workqueue, so there is a race when the adapter gets removed: - the adapter schedules a notification - the notification is on hold - the adapter gets removed and all its children too - the worker fires and access illegal memory Add an API to actually kill the