mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 00:00:00 +00:00
USB: chipidea: fix use after free bug
The pointer to a platform_device struct must not be dereferenced after the device has been unregistered. This bug produces a crash when unloading the ci13xxx kernel module compiled with CONFIG_PAGE_POISONING enabled. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Cc: stable <stable@vger.kernel.org> # 3.6 Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9db72fe6c9
commit
98c3553442
@ -385,8 +385,9 @@ EXPORT_SYMBOL_GPL(ci13xxx_add_device);
|
||||
|
||||
void ci13xxx_remove_device(struct platform_device *pdev)
|
||||
{
|
||||
int id = pdev->id;
|
||||
platform_device_unregister(pdev);
|
||||
ida_simple_remove(&ci_ida, pdev->id);
|
||||
ida_simple_remove(&ci_ida, id);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ci13xxx_remove_device);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user