linux/drivers/iio
Dmitry Rokosov 10b9c2c33a iio:humidity:hts221: rearrange iio trigger get and register
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>
2022-06-19 17:22:49 +01:00
..
accel iio:accel:mxc4005: rearrange iio trigger get and register 2022-06-19 17:22:48 +01:00
adc iio: adc: aspeed: Fix refcount leak in aspeed_adc_set_trim_data 2022-06-19 17:22:48 +01:00
addac iio: addac: ad74413r: correct comparator gpio getters mask usage 2022-01-30 14:23:33 +00:00
afe iio: afe: rescale: Fix boolean logic bug 2022-06-19 17:22:48 +01:00
amplifiers Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
buffer iio: hw_consumer: Use struct_size() helper in kzalloc() 2022-01-23 18:03:37 +00:00
cdc iio:cdc:ad7150: Fix use of uninitialized ret 2021-04-07 08:36:39 +01:00
chemical iio:chemical:ccs811: rearrange iio trigger get and register 2022-06-19 17:22:49 +01:00
common Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
dac iio: dac: ltc2688: fix voltage scale read 2022-04-16 15:00:08 +01:00
dummy iio:dummy: Drop set but unused variable len. 2021-12-21 15:10:09 +00:00
filter iio:filter:admv8818: select REGMAP_SPI for ADMV8818 2022-04-04 09:19:01 +01:00
frequency iio: freq: admv1014: Fix warning about dubious x & !y and improve readability 2022-06-19 17:22:48 +01:00
gyro iio: gyro: mpu3050: Fix the error handling in mpu3050_power_up() 2022-06-19 17:22:48 +01:00
health spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
humidity iio:humidity:hts221: rearrange iio trigger get and register 2022-06-19 17:22:49 +01:00
imu iio: imu: inv_icm42600: Fix I2C init possible nack 2022-04-16 15:03:58 +01:00
light iio:light:rpr0521: Switch from CONFIG_PM guards to pm_ptr() etc 2022-02-21 19:33:04 +00:00
magnetometer iio: magnetometer: yas530: Fix memchr_inv() misuse 2022-05-07 15:34:19 +01:00
multiplexer iio: multiplexer: iio-mux: Support settle-time-us property 2021-10-21 20:02:54 +01:00
orientation iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
position iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
potentiometer Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
potentiostat iio: lmp91000: Remove no-op trigger ops 2021-11-17 17:51:38 +00:00
pressure Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
proximity iio: sx9324: Fix default precharge internal resistance register 2022-04-10 17:49:01 +01:00
resolver iio:resolver:ad2s1200: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
temperature Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
test iio: test: add basic tests for the iio-rescale driver 2022-02-28 10:22:24 +00:00
trigger iio: trigger: sysfs: fix use-after-free on remove 2022-06-19 17:22:48 +01:00
iio_core_trigger.h iio: core-trigger: make iio_device_register_trigger_consumer() an int return 2021-03-11 20:47:02 +00:00
iio_core.h iio: Mark iio_device_type as const 2021-11-17 17:51:35 +00:00
industrialio-buffer.c First set of new device support, fixes, cleanups and features for IIO in 5.18 2022-03-18 12:41:32 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: Use sysfs_emit() 2022-01-23 18:03:36 +00:00
industrialio-event.c iio: introduce mag_referenced 2022-02-21 19:33:05 +00:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c 1st set of IIO new device support, features and cleanup for 5.17 2021-12-22 12:33:01 +01:00
industrialio-triggered-event.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
inkern.c iio: inkern: make a best effort on offset calculation 2022-01-30 14:38:03 +00:00
Kconfig iio: add filter subfolder 2021-12-16 17:29:46 +00:00
Makefile iio: add filter subfolder 2021-12-16 17:29:46 +00:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00