Skip to content
Commit 901f84de authored by Tomasz Duszynski's avatar Tomasz Duszynski Committed by Jonathan Cameron
Browse files

iio: core: fix ioctl handlers removal



Currently ioctl handlers are removed twice. For the first time during
iio_device_unregister() then later on inside
iio_device_unregister_eventset() and iio_buffers_free_sysfs_and_mask().
Double free leads to kernel panic.

Fix this by not touching ioctl handlers list directly but rather
letting code responsible for registration call the matching cleanup
routine itself.

Fixes: 8dedcc3e ("iio: core: centralize ioctl() calls to the main chardev")
Signed-off-by: default avatarTomasz Duszynski <tomasz.duszynski@octakon.com>
Acked-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210423080244.2790-1-tomasz.duszynski@octakon.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent f73c7307
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment