mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
arm_mpam: Fix a NULL pointer dereference on unbinding after an error interrupt
If a user unbinds an MSC after mpam_disable() has been run in response
to an error interrupt then a dereference of a NULL pointer occurs as
mpam_disable() sets the drvdata to NULL. Add an early return to the driver
remove callback to avoid this.
Fixes: f04046f257 ("arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
2c43aced9b
commit
fc996c3968
|
|
@ -2017,6 +2017,9 @@ static void mpam_msc_drv_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct mpam_msc *msc = platform_get_drvdata(pdev);
|
||||
|
||||
if (!msc)
|
||||
return;
|
||||
|
||||
mutex_lock(&mpam_list_lock);
|
||||
mpam_msc_destroy(msc);
|
||||
mutex_unlock(&mpam_list_lock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user