Re: [PATCH] iio: trigger: close race condition in acquiring trigger reference

2017-01-22 Thread Jonathan Cameron
On 22/01/17 03:28, Alison Schofield wrote: > In iio_trigger_write_current() we find the trigger we want while > holding mutex on the list of triggers, but we don't actually do a > get on it while holding mutex. We wait until further validations > are completed and we're sure it's the one we want.

[PATCH] iio: trigger: close race condition in acquiring trigger reference

2017-01-21 Thread Alison Schofield
In iio_trigger_write_current() we find the trigger we want while holding mutex on the list of triggers, but we don't actually do a get on it while holding mutex. We wait until further validations are completed and we're sure it's the one we want. Race condition is that it could be freed by the ti