WSL2-Linux-Kernel/drivers/iio/chemical
Dmitry Rokosov a135631804 iio:chemical:ccs811: rearrange iio trigger get and register
commit d710359c0b 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: f1f065d7ac ("iio: chemical: ccs811: Add support for data ready trigger")
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220524181150.9240-5-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:28 +02:00
..
Kconfig iio: chemical: Add driver support for sgp40 2021-08-08 15:19:18 +01:00
Makefile iio: chemical: Add driver support for sgp40 2021-08-08 15:19:18 +01:00
ams-iaq-core.c
atlas-ezo-sensor.c
atlas-sensor.c iio: chemical: atlas-sensor: Balance runtime pm + pm_runtime_resume_and_get() 2021-06-16 14:53:13 +01:00
bme680.h
bme680_core.c iio: bme680: Use DIV_ROUND_CLOSEST() instead of open-coding it 2021-01-09 21:52:45 +00:00
bme680_i2c.c iio: bme680_i2c: Remove acpi_device_id table 2021-05-17 13:54:23 +01:00
bme680_spi.c iio: bme680_spi: Remove acpi_device_id table 2021-05-17 13:54:23 +01:00
ccs811.c iio:chemical:ccs811: rearrange iio trigger get and register 2022-06-29 09:03:28 +02:00
pms7003.c iio: chemical: pms7003: convert comma to semicolon 2021-01-09 14:25:28 +00:00
scd30.h
scd30_core.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
scd30_i2c.c
scd30_serial.c iio: use getter/setter functions 2021-03-11 20:47:07 +00:00
sgp30.c iio: chemical: sgp30: Drop use of %hx in format string. 2021-06-03 18:24:13 +01:00
sgp40.c iio: chemical: Add driver support for sgp40 2021-08-08 15:19:18 +01:00
sps30.c iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30.h iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30_i2c.c iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30_serial.c iio: sps30: add support for serial interface 2021-05-17 13:49:10 +01:00
vz89x.c iio:chemical:vz89x: Drop of_match_ptr protection and use generic fw accessors 2020-09-21 18:41:32 +01:00