WSL2-Linux-Kernel/drivers/iio/humidity
Dmitry Rokosov 974e69beeb iio:humidity:hts221: rearrange iio trigger get and register
commit 10b9c2c33a upstream.

IIO trigger interface function iio_trigger_get() should be called after
iio_trigger_register() (or its devm analogue) strictly, because of
iio_trigger_get() acquires module refcnt based on the trigger->owner
pointer, which is initialized inside iio_trigger_register() to
THIS_MODULE.
If this call order is wrong, the next iio_trigger_put() (from sysfs
callback or "delete module" path) will dereference "default" module
refcnt, which is incorrect behaviour.

Fixes: e4a70e3e7d ("iio: humidity: add support to hts221 rh/temp combo device")
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220524181150.9240-6-ddrokosov@sberdevices.ru
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-29 09:03:27 +02:00
..
Kconfig iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-10 14:01:48 +01:00
Makefile
am2315.c iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:29 +01:00
dht11.c
hdc100x.c iio: humidity: hdc100x: Add margin to the conversion time 2021-07-24 18:13:02 +01:00
hdc2010.c iio: humidity: hdc2010: Drop duplicate setting of iio_dev.dev.parent 2021-05-17 13:49:12 +01:00
hid-sensor-humidity.c iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
hts221.h
hts221_buffer.c iio:humidity:hts221: rearrange iio trigger get and register 2022-06-29 09:03:27 +02:00
hts221_core.c
hts221_i2c.c
hts221_spi.c
htu21.c
si7005.c
si7020.c