mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 04:37:44 +08:00
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 <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20230612224033.2382527-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
committed by
Hans de Goede
parent
aeaee158c2
commit
fa5e68b1c1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user