Skip to content

Commit fa5e68b

Browse files
spandruvadajwrdegoede
authored andcommitted
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]>
1 parent aeaee15 commit fa5e68b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/platform/x86/intel/speed_select_if/isst_if_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ void isst_if_cdev_unregister(int device_type)
831831
{
832832
isst_misc_unreg();
833833
mutex_lock(&punit_misc_dev_open_lock);
834+
punit_callbacks[device_type].def_ioctl = NULL;
834835
punit_callbacks[device_type].registered = 0;
835836
if (device_type == ISST_IF_DEV_MBOX)
836837
isst_delete_hash();

0 commit comments

Comments
 (0)