Message ID | 20220208145928.12468-3-laurentiu.tudor@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5FC6C433EF for <linux-arm-kernel@archiver.kernel.org>; Tue, 8 Feb 2022 15:01:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MAjrEi6206XqW7uZM1jxUvfb1kKzreRAwtKG0IbUUt4=; b=qYixcUVaQHP4WR tc8Z3qoT+JvFeCkJsbYe9jW+V9L2NtCqMhuGe3e5TEx+ZhMS90Oyur6z3VLNeKChiQbtaOuCJjrVK TzKMtanJKwPu1WB/A8wLlBaqcrhq87WtD8OiTHqGxw6hIQ2JOOZh+GzT2D8D+drIpLHSNV0GXq7vw oj58daOZw3I4QTMpsUzx/DhBJnPgY4b1YK9onuHeHC+ltx0+iR1JxCrUdEHRGm8SNV0pbGYRfJiig VAt+dHe/XlJetCmMC/En2ktTSze6xNMEluAR9W9dVXBGEaEVrGiz4+QZElHxvyTOKBXD9rZbE6plF 6Yy2KHAaXbSbCDGE9Ppg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHRyL-00ELmf-F3; Tue, 08 Feb 2022 15:00:01 +0000 Received: from mail-vi1eur04on060f.outbound.protection.outlook.com ([2a01:111:f400:fe0e::60f] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHRy6-00ELeg-L1 for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 14:59:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BCPXgsnnG9Twt2g+LdIvu8gj+Ypv7yFgrzVoI7+WIYGXqd8mcCMBF/a+sIDlfn9Sea0/O24iAj8UQj8279XU67JvukZEywg55qmt4JLMhvXaLsVX+ZYQirfpWXrI132rzi1MDVxpKOByEaaqKCuATKlU1OUW42CZMFKVTtrgi7HvN9fXCuDRqb47joWOX0AnzHnstiF5OoZgOYG3rrfkY9FYbBwAiMH2NRDzFjU90KWViCUZbr2cBOZSrhbtds9nvPieFLNuxRdGhctK3gWKzreHDIe7FF2qOKCTJxgbY8p49vveIHT14BW/3oYePweMIcwm7WZorkspcg8Jk/WnHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KEiP/ywqN9yMvcn/2KHSElXcnlQrXeO8JiGoouRU/uk=; b=LWIjdrCQ5aioiICIHVBA9mL7DMUCzFD+bvOtQu6Weo5osQQLpr+RAm9I98AUx7aOY/Q0BphOejqFrSzwKYH+PQV4IlW4YZRsUuPdujJyBwjzDRbxU7LsfYssmuDDWsnIwMCwQNs6Rb3HfZlM2WG6vOpqQxk2RJiQ8cWVJWbXFCtcjT0m+3p8CvgI5ZKVuKW8kdHni0eSKeW/IxzRw6sZEAXsvmqa8Sn2aGU+vHnnCl3+r5fFZw5EHnLRDwpWez5kRzz8ApkKffDcMtRSxOl2FymizeX98IB7HUT/lPFhENpM6kTYcJEkAvjqgv+fnfiY19x4rOsA7rHUd67gksnEPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KEiP/ywqN9yMvcn/2KHSElXcnlQrXeO8JiGoouRU/uk=; b=lgyYfc6zJw06UHl2sco25CM5X3Txm9mnBnynUcnknb6wIp2DQ6wEZTfU6sJ0lGSta8Xko92FBiVn9XxwCvliXWXTwWHSjU2TfTPPG01tgK9jJQ91kTnmdCP669wyhx3jixK0yEeCKJB05o1dSNAjI4MjAEWW8K9qEI+l9tQIPJE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR0402MB3405.eurprd04.prod.outlook.com (2603:10a6:803:3::26) by AS1PR04MB9381.eurprd04.prod.outlook.com (2603:10a6:20b:4db::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.19; Tue, 8 Feb 2022 14:59:40 +0000 Received: from VI1PR0402MB3405.eurprd04.prod.outlook.com ([fe80::f826:3bf6:b77d:5a53]) by VI1PR0402MB3405.eurprd04.prod.outlook.com ([fe80::f826:3bf6:b77d:5a53%7]) with mapi id 15.20.4951.019; Tue, 8 Feb 2022 14:59:40 +0000 From: laurentiu.tudor@nxp.com To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: ioana.ciornei@nxp.com, diana.craciun@oss.nxp.com, jon@solid-run.com, Laurentiu Tudor <laurentiu.tudor@nxp.com> Subject: [PATCH 2/6] bus: fsl-mc: fix a use-after-free issue Date: Tue, 8 Feb 2022 16:59:24 +0200 Message-Id: <20220208145928.12468-3-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220208145928.12468-1-laurentiu.tudor@nxp.com> References: <20220208145928.12468-1-laurentiu.tudor@nxp.com> X-ClientProxiedBy: AM0PR08CA0025.eurprd08.prod.outlook.com (2603:10a6:208:d2::38) To VI1PR0402MB3405.eurprd04.prod.outlook.com (2603:10a6:803:3::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ffb46b98-8915-4316-64db-08d9eb13a1df X-MS-TrafficTypeDiagnostic: AS1PR04MB9381:EE_ X-Microsoft-Antispam-PRVS: <AS1PR04MB93811859CE63FCDCC4B26650EC2D9@AS1PR04MB9381.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:785; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h0TLp/o3YCDWqWDbuoMWri5QtwYAVR6Ebd5czgQ73lTprNEmMGIhqCheprPFpmzpGxkiEus5/pT42DOYXKgSO4QzWasPanq2HlOdfiD9mLMhNA5coKxkWBJC8J7m3j4gv2ov/gMZjUD43Aye1i0ri8EmEIkl8gFYyunoPGCLeqfaQVj1ULhdpkSPO8jASk+kcxtNlCbjr2v8PzN0pmxGid1qmj9fnSc3U4vYe3XOfK8rhlRWA6lq8RjNAH5uYM/SEsPGcMTNa5U2YDG5Gu4MBBeS2NZg13d3IK3FUAkyxs8SvZGq0ikywu1MdF4CZmtdNds8yIS92J/1YSewY/uoZ4nUT5G8fodgq5UFcsbGddMbIP/5fnN2UdIjlmF3PMMbwjZ3ByqZa3FO+fHrTmSwqFlUf5bB9WMLSQRCh7M8hpfuHXz6BhNq+/pTix7rXxBYgURP0SduS6h/9S3JBNpq9z0qR4/qMzRP3/BqrEV5NO/lhhYPLAjvckrHHSWS1CXfkb8fJ8TsGbJqU6l3s5oAjyVzZXfK849beEA1nz588J6m/me4YjCgdfavJCQiNrcNjkO+yhIskvFj5UQd0pCKXNYLClYktoTYT4pNwTpD/sZ2Ox7kbQkeKY54KKYa9eJKTEDBRMVmAdR10uerEVfCBnMSAXF+SJwnIkLroAkJetrtivWKHNjr6y/FVl6XXlyzReHLPYwi2FKaX6GgtG8+og== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3405.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(66476007)(6506007)(6666004)(4326008)(38100700002)(8936002)(83380400001)(66946007)(508600001)(8676002)(66556008)(2906002)(186003)(36756003)(6486002)(86362001)(2616005)(5660300002)(6512007)(9686003)(26005)(1076003)(52116002)(316002)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J6H42U7skdzkdoc9dsw9mM8HkwnHKeC/DyoqoY37QrgzN4aUTSnbfUntQB0LGtI2tLKE6HpgxSmc4YyRozEMWvxxxvpR/JWryPZfUkIKa33ON/9Y9pQtoJUdo8Ly/MxeiSpKjFidzRpC7t3EcGOmC86E0s6CzQeNp9AFlGCYKL6Oe51buemjSGQpDwMWvJ1yf8hK8g/ccVsURCFaJep9r9HNpdQrm3muh9CEtktJEgLqZLyi52KMRWIUxTs+iQl4pvcUlBwK3Rp8xX9uKS9wU+76s+mk/6W/VCPBUreNS4grJ1hDolltFTcUaU9xRLgQhxdPtwixBBZYmdWDCsFPNMCyum3Jz/BxkZuNz/MQrJQY/F3bHIhZt6EO5Fl1xbaTJ15ceO4iCCL/8Ic5hyTigRBngvlrGchNSs1vAIvYFLMNkxMxqziqNrlnghm192tFezBn0bdPN7hNF/Z4EyN1O3wX7j5SISnVsHCfKMl5nIA+N79bqKxPcawK56X2CMDqrOKbfmlJK7Fwn9XjQVW0I7ZODc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+Y42VhpxfJXyavZsg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffb46b98-8915-4316-64db-08d9eb13a1df X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3405.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2022 14:59:40.3876 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a3dhwc/jnSKpCQw38FBhgKELyQdSqerIw5jYD4Yv/i8OJRbe8RmipeJvWwUOR5CnTqO1dyqMKENHrSF+GSMa3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9381 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_065946_725341_6E525BEE X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
bus: fsl-mc: fixes and .shutdown() op for dprc driver
|
expand
|
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 8fd4a356a86e..8cbac1b4b60e 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -1236,14 +1236,16 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) static int fsl_mc_bus_remove(struct platform_device *pdev) { struct fsl_mc *mc = platform_get_drvdata(pdev); + struct fsl_mc_io *mc_io; if (!fsl_mc_is_root_dprc(&mc->root_mc_bus_dev->dev)) return -EINVAL; + mc_io = mc->root_mc_bus_dev->mc_io; + fsl_mc_device_remove(mc->root_mc_bus_dev); - fsl_destroy_mc_io(mc->root_mc_bus_dev->mc_io); - mc->root_mc_bus_dev->mc_io = NULL; + fsl_destroy_mc_io(mc_io); bus_unregister_notifier(&fsl_mc_bus_type, &fsl_mc_nb);