Skip to contentSkip to conversation

phy: phy-mxs-usb: suspend to RAM causes NULL pointer dereference

PATCH New Stefan Wahren 2 participants 4 messages Jun 15, 2015 – Jun 30, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: phy-mxs-usb: suspend to RAM causes NULL pointer dereference

Triggering suspend to RAM via sysfs on a i.MX28 causes a NULL pointer dereference. This patch avoids the oops in mxs_phy_get_vbus_status() by aborting since there is no syscon available.

Fixes efdbd3a5d6e ("usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connection")
---
 drivers/usb/phy/phy-mxs-usb.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/usb/phy/phy-mxs-usb.c +3 -0
index 8f7cb06..3fcc048 100644
@@ -217,6 +217,9 @@ static bool mxs_phy_get_vbus_status(struct mxs_phy *mxs_phy)
 {
 	unsigned int vbus_value;
 
+	if (!mxs_phy->regmap_anatop)
+		return false;
+
 	if (mxs_phy->port_id == 0)
 		regmap_read(mxs_phy->regmap_anatop,
 			ANADIG_USB1_VBUS_DET_STAT,
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 phy: phy-mxs-usb: suspend to RAM causes NULL pointer dereference

Am 15.06.2015 um 06:37 schrieb Stefan Wahren:

Quoted 8 lines

Triggering suspend to RAM via sysfs on a i.MX28 causes a NULL pointer dereference. This patch avoids the oops in mxs_phy_get_vbus_status() by aborting since there is no syscon available.

Fixes efdbd3a5d6e ("usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connection")

Just a gentle ping

#2 lore raw

PATCH 1/1 phy: phy-mxs-usb: suspend to RAM causes NULL pointer dereference

Quoted 11 lines · Stefan Wahren

Am 15.06.2015 um 06:37 schrieb Stefan Wahren:

Quoted 8 lines

Triggering suspend to RAM via sysfs on a i.MX28 causes a NULL pointer dereference. This patch avoids the oops in mxs_phy_get_vbus_status() by aborting since there is no syscon available.

Fixes efdbd3a5d6e ("usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connection")

Just a gentle ping

it's in my queue, but -rc1 wasn't tagged yet, was it ? In a hurry for some reason ?

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150630/22885890/attachment.sig>
#3 lore raw

PATCH 1/1 phy: phy-mxs-usb: suspend to RAM causes NULL pointer dereference

Am 30.06.2015 um 08:10 schrieb Felipe Balbi:

Quoted 6 lines · Stefan Wahren
Quoted 5 lines

Am 15.06.2015 um 06:37 schrieb Stefan Wahren:

Quoted 4 lines

Triggering suspend to RAM via sysfs on a i.MX28 causes a NULL pointer dereference. This patch avoids the oops in mxs_phy_get_vbus_status() by aborting since there is no syscon available.

Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Fixes efdbd3a5d6e ("usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connection")

Just a gentle ping

it's in my queue, but -rc1 wasn't tagged yet, was it ? In a hurry for some reason ?

Everything is fine. Sorry for the noise.

Stefan