Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965424Ab3DIJXt (ORCPT ); Tue, 9 Apr 2013 05:23:49 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:30032 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936673Ab3DIJXl (ORCPT ); Tue, 9 Apr 2013 05:23:41 -0400 X-AuditID: cbfee68f-b7f4a6d000001436-fc-5163de1afa32 From: Vivek Gautam To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, stern@rowland.harvard.edu, kgene.kim@samsung.com, Manjunath Goudar , Arnd Bergmann , Jingoo Han Subject: [PATCH] usb: ehci-s5p: fix: Fix null pointer dereferencing Date: Tue, 09 Apr 2013 14:51:52 +0530 Message-id: <1365499312-14232-1-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsWyRsSkTlf6XnKgwUVWi7+TjrFbNC9ez2Zx eeElVoveBVeBrF1z2CxmnN/HZLFoWSuzxb+f+9gsJvy+wObA6fH71yRGjzvX9rB57J+7ht1j 9t0fjB59W1YxenzeJBfAFsVlk5Kak1mWWqRvl8CV0dK4lq1gFkdF98sV7A2MH9i6GDk5JARM JLZefcsIYYtJXLi3HijOxSEksJRRYs28SXBFE/4fZQaxhQSmM0pc+skEUTSFSeL+jZNgRWwC uhJNb3eBTRIRcJBYsvQO2CRmgaeMEq0nFrCDJIQFnCW+nDjMCmKzCKhKfO3bBNTAwcEr4CFx 94U+xDIFiTe3nzGD9EoITGeXOLxpMjNEvYDEt8mHWEDqJQRkJTYdYIaol5Q4uOIGywRGwQWM DKsYRVMLkguKk9KLjPWKE3OLS/PS9ZLzczcxAkP69L9n/TsY7x6wPsSYDDRuIrOUaHI+MCby SuINjc2MLExNTI2NzC3NSBNWEudVa7EO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7e3OU5q1bV20gyhGuxFKckWioxVxUnAgAHj9npd0CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1262 Lines: 38 7edb3da makes ehci-s5p as a separate driver. But, it raised an issue with its driver data. Now that 's5p_ehci_hcd' doesn't maintain pointer to 'usb_hcd' and s5p_ehci is nothing but a pointer to hcd->priv; add hcd to the driver data rather than s5p_ehci. This fixes issues with null pointer dereferencing in s5p_ehci_shutdown(), s5p_ehci_suspend(), s5p_ehci_resume(). Signed-off-by: Vivek Gautam CC: Manjunath Goudar CC: Arnd Bergmann CC: Jingoo Han --- drivers/usb/host/ehci-s5p.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index d8cb0ca..580548a 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c @@ -173,7 +173,7 @@ static int s5p_ehci_probe(struct platform_device *pdev) goto fail_add_hcd; } - platform_set_drvdata(pdev, s5p_ehci); + platform_set_drvdata(pdev, hcd); return 0; -- 1.7.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/