From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:49219 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754889AbbG3BuC (ORCPT ); Wed, 29 Jul 2015 21:50:02 -0400 Subject: Patch "usb: phy: mxs: suspend to RAM causes NULL pointer dereference" has been added to the 4.1-stable tree To: stefan.wahren@i2se.com, balbi@ti.com, gregkh@linuxfoundation.org, peter.chen@freescale.com Cc: , From: Date: Wed, 29 Jul 2015 18:50:00 -0700 Message-ID: <1438221000105205@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled usb: phy: mxs: suspend to RAM causes NULL pointer dereference to the 4.1-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-phy-mxs-suspend-to-ram-causes-null-pointer-dereference.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 543aa4867d4a2dff5fc11e1b688197ee3bad7f89 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 15 Jun 2015 04:37:00 +0000 Subject: usb: phy: mxs: suspend to RAM causes NULL pointer dereference From: Stefan Wahren commit 543aa4867d4a2dff5fc11e1b688197ee3bad7f89 upstream. 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. Signed-off-by: Stefan Wahren Fixes: efdbd3a5d6e ("usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connection") Acked-by: Peter Chen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/phy/phy-mxs-usb.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -217,6 +217,9 @@ static bool mxs_phy_get_vbus_status(stru { 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, Patches currently in stable-queue which might be from stefan.wahren@i2se.com are queue-4.1/usb-phy-mxs-suspend-to-ram-causes-null-pointer-dereference.patch