Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934734Ab3DINOx (ORCPT ); Tue, 9 Apr 2013 09:14:53 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:10080 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759517Ab3DINOv (ORCPT ); Tue, 9 Apr 2013 09:14:51 -0400 X-AuditID: cbfee68d-b7f786d000005188-17-516414492f07 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 v2] usb: ehci-s5p: fix: Fix null pointer dereferencing Date: Tue, 09 Apr 2013 18:42:11 +0530 Message-id: <1365513131-27691-1-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: References: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42JZI2JSo+spkhJo8OqMusXfScfYLZoXr2ez uLzwEqtF74KrQNauOWwWM87vY7JYtKyV2eLfz31sFhN+X2Bz4PT4/WsSo8eda3vYPPbPXcPu MfvuD0aPvi2rGD0+b5ILYIvisklJzcksSy3St0vgyph6YxZLwW6OioP9z1gbGLvYuxg5OSQE TCRWr/zJDGGLSVy4t56ti5GLQ0hgKaPE4lfrmGGKGrZOZIJILGKUeNTTxQqSEBKYwiSxZocl iM0moCvR9HYXI4gtIuAgsWTpHbBJzAJPGSVaTywAWycs4CaxZfExMJtFQFWi9d4vMJtXwEPi 6ac/UCcpSLy5/QxoMwcHp0CwxLwbNSCmkECARNu3apCREgKb2CW27l3OCjFGQOLb5EMsIDUS ArISmw5A3SwpcXDFDZYJjMILGBlWMYqmFiQXFCelFxnqFSfmFpfmpesl5+duYgTGwOl/z3p3 MN4+YH2IMRlo3ERmKdHkfGAM5ZXEGxqbGV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L rjjy32XXpbcEef9Zec7RnVawIOpzvUzNGTXGJvckwV71p+7ZfovbSovNW25eszzloMFjocRS nJFoqMVcVJwIACv8S3T0AgAA 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: 1292 Lines: 41 7edb3da: (USB: EHCI: make ehci-s5p a separate driver) raised an issue with ehci-s5p's 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 --- Based on 'usb-next' 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/