Message ID | 1515754856-4029-1-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Geert Uytterhoeven |
Headers | show
Return-Path: <linux-renesas-soc-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 51102602A7 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 12 Jan 2018 11:05:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B040287FF for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 12 Jan 2018 11:05:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EDD828802; Fri, 12 Jan 2018 11:05:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01D54287FF for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 12 Jan 2018 11:05:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933305AbeALLF3 (ORCPT <rfc822;patchwork-linux-renesas-soc@patchwork.kernel.org>); Fri, 12 Jan 2018 06:05:29 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:5480 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932740AbeALLF1 (ORCPT <rfc822;linux-renesas-soc@vger.kernel.org>); Fri, 12 Jan 2018 06:05:27 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 12 Jan 2018 20:05:25 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 5841E731F2; Fri, 12 Jan 2018 20:05:25 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.46,348,1511794800"; d="scan'208";a="268072451" Received: from mail-os2jpn01lp0147.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.147]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 12 Jan 2018 20:05:25 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NpfY+uQSfOIN0WMydROmQbJ8bTFLLEPzRmXeF/gbLpY=; b=QyM9sdOFvle9onUVO7EYr4HTJZHPX8rsDlNyMV9E0X4m2fn706CBZxD51lXRlLhIdBw1F5wIRtefGOlSsl49x/+j1u2Ih7gW4PdULpVTaJfIumERulx8Y4zo12YNnR25nUQsBv/5AvFp0rajh5rxrf38jWa6kiEF6kPqZiLeqnA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.138) by TY1PR06MB0992.apcprd06.prod.outlook.com (10.164.99.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 12 Jan 2018 11:05:22 +0000 From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> To: balbi@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Subject: [PATCH] usb: gadget: udc: renesas_usb3: fix oops in renesas_usb3_remove() Date: Fri, 12 Jan 2018 20:00:56 +0900 Message-Id: <1515754856-4029-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [211.11.155.138] X-ClientProxiedBy: TY1PR01CA0183.jpnprd01.prod.outlook.com (52.133.160.13) To TY1PR06MB0992.apcprd06.prod.outlook.com (10.164.99.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 98fa1da3-43f2-4c2b-9ab5-08d559ac606b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020080)(4652020)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:TY1PR06MB0992; X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0992; 3:7xhFOsnvpjFnTzNv3GMD9qXrGLl8Otu3QJdKt9RHBqR4TgV7VoaAuQbinIjdUWEqwdliY1UXeBnUYPKAw8DaZe2mVu/Eh1ld/SVeW8SysfgYLQBo6CKRPDNF7EcgWrNXO1nMZ7flJPlXTYVddKvEafdPlzA9yAZpYa+L15kIijKN93xr2cRedFXMztjgMOBd+etXK9H5QJKHdZrNqIksNcYt2mNVKfvsEaKoA4J+c3mpYNbVVACc9jFLjjBN/ddY; 25:TP66B5nksfovUikcjvh5akopn4394YaE66fkqEkduuacxPjGD2SM+v4IvLhlIzbZ8lHt20sk9jf4s/Q6RtdwqgV7ATIqEMC9oEiSCdrW7xwAcmlwb3dGoyEO7i6f9iBmPB8Hd0DsQmU8j/yDbHoA0TDlfuntK1Dzk0Ly9Y3wNjMLYBluc5rhbVH2P59SN2rWffNcupy0cNjbjcNbP1ecCfqLANPU3AuQogR9IhhbM75310P+mYRDqb3YLgKmU8BjUMuRz4Cn3YaIoyhyJMazdU6Z8VXID036/kjT7ERXUOPkkaGxFKvmJSeyzbKfS6fC406dQUIyWDJYtVUKr1wUniz2IMudX/JqSHvWCIt7zDU=; 31:mkxDLpRRJsPGb5TVM5VCaI3UJg33gf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Antispam-PRVS: <TY1PR06MB0992CA1AFF85C5D50FEB6B97B8170@TY1PR06MB0992.apcprd06.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3231023)(944501142)(93006095)(3002001)(6055026)(6041268)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123558120)(6072148)(201708071742011); SRVR:TY1PR06MB0992; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:TY1PR06MB0992; X-Forefront-PRVS: 0550778858 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(346002)(376002)(39860400002)(39380400002)(366004)(396003)(189003)(199004)(81156014)(81166006)(316002)(51416003)(97736004)(6116002)(4326008)(8676002)(78352004)(66066001)(52116002)(50226002)(16586007)(53936002)(3846002)(6486002)(6512007)(8936002)(47776003)(25786009)(498600001)(2361001)(16526018)(6506007)(2351001)(36756003)(50466002)(107886003)(106356001)(2906002)(7736002)(386003)(305945005)(6916009)(68736007)(15760500003)(105586002)(48376002)(59450400001)(5660300001)(42882006)(6666003)(3720700003); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR06MB0992; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:0; A:0; LANG:en; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; TY1PR06MB0992; 23:Nbv4DPonk71xMDs7AFCEq7cPOsx9H/DJpW/czE/pI?= =?us-ascii?Q?wkPwrhuRaDStHPWwGy71A9rq8N3ecQELGw/ngfKEdsbO+5BhX9gNga1tT2EY?= =?us-ascii?Q?xi1ijfP2OGiUEsaDZpJiuTxdz+UV8a3T28p6drTvnbMBEWr8OR24TaMbPx0E?= =?us-ascii?Q?bCevBU77gHaPXv8TR8viuFxFTEJFhc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i7H/uguCpuT85dFeh7/ddJvACE4aaOVNgPdcNMQVvm2Qj0E2EzSqmq6N6M3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0992; 20:NgtdvN5h9KGnuRhG8sgOw+o+qTSlieIAmO/elLHvXzR0mBuSagLTnWXlxLjabknuH3C0POnMAYwLxHHEVRVgPb5EQ1LxixODfmSWYzuHV0G6AJI32WQyJElDqI+VVLGAmKw9B5BptWycNUtJigH0WujndPT5OjSZRAXre/HkDGs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 11:05:22.8923 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98fa1da3-43f2-4c2b-9ab5-08d559ac606b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0992 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-renesas-soc.vger.kernel.org> X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index 6e87af2..409cde4 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -2410,7 +2410,7 @@ static int renesas_usb3_remove(struct platform_device *pdev) __renesas_usb3_ep_free_request(usb3->ep0_req); if (usb3->phy) phy_put(usb3->phy); - pm_runtime_disable(usb3_to_dev(usb3)); + pm_runtime_disable(&pdev->dev); return 0; }
This patch fixes an issue that the renesas_usb3_remove() causes NULL pointer dereference because the usb3_to_dev() macro will use the gadget instance and it will be deleted before. Fixes: cf06df3fae28 ("usb: gadget: udc: renesas_usb3: move pm_runtime_{en,dis}able()") Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)