diff options
author | Chen Zhongjin <chenzhongjin@huawei.com> | 2022-11-08 06:28:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-02 19:40:02 +0300 |
commit | 456e895fd0b84069a25d316885acae40e62a46a2 (patch) | |
tree | f928ad23eb851a960c7fef0c3d8c8cc74a90c844 /init | |
parent | fa9efcbfbf77a9b727271935ba99385a4f2d36ee (diff) | |
download | linux-456e895fd0b84069a25d316885acae40e62a46a2.tar.xz |
iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails
commit 4ad09d956f8eacff61e67e5b13ba8ebec3232f76 upstream.
In iio_register_sw_trigger_type(), configfs_register_default_group() is
possible to fail, but the entry add to iio_trigger_types_list is not
deleted.
This leaves wild in iio_trigger_types_list, which can cause page fault
when module is loading again. So fix this by list_del(&t->list) in error
path.
BUG: unable to handle page fault for address: fffffbfff81d7400
Call Trace:
<TASK>
iio_register_sw_trigger_type
do_one_initcall
do_init_module
load_module
...
Fixes: b662f809d410 ("iio: core: Introduce IIO software triggers")
Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
Link: https://lore.kernel.org/r/20221108032802.168623-1-chenzhongjin@huawei.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions