Patch "usb: chipidea: host: fix NULL ptr dereference during shutdown" has been added to the 4.8-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
usb: chipidea: host: fix NULL ptr dereference during shutdown
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-chipidea-host-fix-null-ptr-dereference-during-shutdown.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
991d5add50a5bb6ab8f12f2129f5c7487f6baaf6Mon Sep 17 00:00:00 2001
From: Stefan Wahren <[email protected]>
Date: Sat, 10 Sep 2016 12:53:21 +0000
Subject: usb: chipidea: host: fix NULL ptr dereference during shutdown
From: Stefan Wahren <[email protected]>
commit 991d5add50a5bb6ab8f12f2129f5c7487f6baaf6 upstream.
After commit b09b5224fe86 ("usb: chipidea: implement platform shutdown callback") and commit 43a404577a93 ("usb: chipidea: host: set host to be null after hcd is freed") a NULL pointer dereference is caused on i.MX23 during shutdown. So ensure that role is set to CI_ROLE_END and we finish interrupt handling before the hcd is deallocated. This avoids the NULL pointer dereference.
--- drivers/usb/chipidea/host.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/chipidea/host.c +2 -0
@@ -185,6 +185,8 @@ static void host_stop(struct ci_hdrc *ciif (hcd) {usb_remove_hcd (hcd); + ci->role =CI_ROLE_END ; +synchronize_irq (ci->irq);usb_put_hcd (hcd);if (ci->platdata->reg_vbus && !ci_otg_is_fsm_mode (ci) && (ci->platdata->flags &CI_HDRC_TURN_VBUS_EARLY_ON ))
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/usb-chipidea-host-fix-null-ptr-dereference-during-shutdown.patch