diff options
author | Srinivas Pandruvada <[email protected]> | 2023-06-12 15:40:32 -0700 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-06-13 12:34:50 +0200 |
commit | fa5e68b1c10d56befcee2ee0a9e1eed2c830e352 (patch) | |
tree | 4dc907d5f2e8034267816d0f1a94149ac3015f2a | |
parent | aeaee158c2dbcba3763044424783e98846a1922c (diff) |
platform/x86: ISST: Reset default callback on unregister
When multiple clients are registered and some of those modules are
removed, the default IOCTL callback for those clients are still not
NULL. Calling them will result in crash.
Set the default IOCTL callback pointer to NULL on unregister.
Signed-off-by: Srinivas Pandruvada <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r-- | drivers/platform/x86/intel/speed_select_if/isst_if_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c index e0572a29212e..352bf5118d17 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c @@ -831,6 +831,7 @@ void isst_if_cdev_unregister(int device_type) { isst_misc_unreg(); mutex_lock(&punit_misc_dev_open_lock); + punit_callbacks[device_type].def_ioctl = NULL; punit_callbacks[device_type].registered = 0; if (device_type == ISST_IF_DEV_MBOX) isst_delete_hash(); |