mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-27 20:07:09 +00:00
greybus: audio: gb_manager: Use valid argument while removing ida allocated id.
module->id is used as an argument to ida_simple_remove(). Since module is already dereferenced, module->id might contain invalid data. So fix this. Fixes: da4cc2d0b066 ("audio:gb_manager: Use proper locking around kobject_xxx") Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
ef62adae82
commit
ac00154a7c
@ -76,7 +76,7 @@ int gb_audio_manager_remove(int id)
|
||||
list_del(&module->list);
|
||||
kobject_put(&module->kobj);
|
||||
up_write(&modules_rwsem);
|
||||
ida_simple_remove(&module_id, module->id);
|
||||
ida_simple_remove(&module_id, id);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gb_audio_manager_remove);
|
||||
|
Loading…
Reference in New Issue
Block a user