]> git.baikalelectronics.ru Git - kernel.git/commit
staging:iio:core set the iio_dev.info pointer to null on unregister under lock.
authorJonathan Cameron <jic23@kernel.org>
Wed, 15 Feb 2012 19:48:00 +0000 (19:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 20:10:02 +0000 (12:10 -0800)
commit92854dde011ff5f0f2baa49fd2c85bbfcdbeb151
treeea5052ebeb55cc59fc0f3fa28df1560ddfa487f3
parent49c95799f64d0a134ce1518c7c1189b413711282
staging:iio:core set the iio_dev.info pointer to null on unregister under lock.

This prevents use of provider callbacks after it has been unregistered.
Note that all code using this that can be called from a consumer *must*
check the pointer before using and hold the info_exist_lock throughout
the usage of the callbacks in info.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/iio.h
drivers/staging/iio/industrialio-core.c