Message ID | 20200503142703.14903-4-peng.fan@nxp.com |
---|---|
State | Accepted |
Commit | 6b6c620c824e10a03da3c617aa9f2c6486f7f57a |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=MpfI6onD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49FSRS6Sndz9sRY for <incoming@patchwork.ozlabs.org>; Mon, 4 May 2020 00:04:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 53BE681EDB; Sun, 3 May 2020 16:04:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="MpfI6onD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5EDB581EF0; Sun, 3 May 2020 16:04:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on0610.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::610]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA9A181CD7 for <u-boot@lists.denx.de>; Sun, 3 May 2020 16:04:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R2QoY9TRWXA80QGZzMqorTnvGn5QCdJ4CktzQLn8n2e+twnQSOITA7nE2AhyfwyUHxc7UI61PTo8NqGH6fVJ6XxfSBXb9ZjCnzFqqcCdXQ+rq33Pfy/U2RCGdHWYxborZPYqCrEitea+/ee2jKWLcginJJ6jOLdPmOyHJUUqP4ENJIwQOBuTdcJE5naiDhAKhEmpSz78hLllSdcEsDtSJ5aMLDHX+OpzAjloYBOjjZPcTI4etZx0+xXIe1MOd4790qjTU1hUQ7peiaaL719QWq4I6I0RNLIaqV5uyL07oOO1HBrcdsFo6sh98YFhIbBWvgIh+N+hY4CZ/hu5H4ALrQ== 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-SenderADCheck; bh=2jaGWXkf83iKG2Qhc6avqnPN9Hm2VPCalTbWWbr3+gw=; b=BzhaAkMGGO4346+vUJnWUl3z4RqLL3uFExtHxjlJgkZENPR8LgWnfpBH4JnQJ10sPBhXDTZvuXXA6MseetOSKYUVynuOBFxsnYxW5yLSm+FyCafderi5+8Uy84mEma25CM6pGSR/QcCo8De7cJnp5XwUsifyh3SvBU0qn4S4IvbwgWxKkOYZesRRzYY5fO7525htjNdL/PzRtmYF+fRn9Pb0YRMT4W8QtGcL7iygRhOSqJ0+uU0iJD/wygydJOoS97EAbmnSvMcMomcYnL43TXqtN+5RxixUIoCHkA5xacywChXSMFIaRpeQq/ZzFoNG/FPaQP88bRFXTXAQWRQE1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; 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=2jaGWXkf83iKG2Qhc6avqnPN9Hm2VPCalTbWWbr3+gw=; b=MpfI6onDlvhHyAregbSzUjWbpL431ceeIIHyBPk+ReXHSddk5sLuzA8pdv72ih52eSMzitMK4braQJj/RKsTYlWJIkOWMiJXt3N29aDkTuGWrf3D31e/UnioJKBIIt7FTiINl4hsaO0JOzjP1yMAFkVK16AUm/szs1DyiWsc7V8= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2808.eurprd04.prod.outlook.com (2603:10a6:4:95::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Sun, 3 May 2020 14:04:18 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2958.029; Sun, 3 May 2020 14:04:18 +0000 From: Peng Fan <peng.fan@nxp.com> To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, sjg@chromium.org, daniel.schwierzeck@gmail.com, Ye Li <ye.li@nxp.com>, Peng Fan <peng.fan@nxp.com> Subject: [PATCH 4/4] sata: dwc_ahsata: Fix memory issue in reset_sata Date: Sun, 3 May 2020 22:27:03 +0800 Message-Id: <20200503142703.14903-4-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200503142703.14903-1-peng.fan@nxp.com> References: <20200503142703.14903-1-peng.fan@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0138.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::18) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR01CA0138.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19 via Frontend Transport; Sun, 3 May 2020 14:04:15 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: eb3a74f4-7e31-4110-da9e-08d7ef6ade8b X-MS-TrafficTypeDiagnostic: DB6PR0402MB2808:|DB6PR0402MB2808: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB6PR0402MB2808923E49136BAB91FD20F888A90@DB6PR0402MB2808.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-Forefront-PRVS: 0392679D18 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yQaZ5ez2iUO2bWKd/BZ5IQzdm3R3C1FuycKpDEHE2kH15P3yuyRHFkYCG8xBN2TUPtyytpbIVjKTbZY+1djvPjX87wNNX8k9++NTeeWRYOPLAkl/mRnJO8Bg5w4o8jblkY+0vHF8meflywF8in5wNaBSu1Kfn5Sde7tfKG/LFedQRXrbXyLNU9tSeDuOdOUqAVqhsEYAzh6Z2N9HVnErWBYj/DAlT2D+eBC4c152k8KzdePrGKur1Sti/V4hTX1lTHqPGV8mgaFX7tZdzQr4FyKZvvQIiohtwZ60m80wlI0vhOS1IAjYCg8B3a3eRf3qa465BEqUmvZAeSGGKfBsHJUVL0Fo8rwCFHwvZIIrmSwBxGfPiw5gRDVHPUTEqdtdbkvrbb48kKFmSkia+WA0s8DoFlujBmdCd9/VEYW3+9IZfL+wKuJy1l3B+k+wEGIz X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(36756003)(2906002)(6506007)(66476007)(16526019)(186003)(66556008)(66946007)(52116002)(4326008)(4744005)(86362001)(1076003)(316002)(54906003)(5660300002)(8936002)(44832011)(8676002)(956004)(2616005)(6666004)(478600001)(6486002)(26005)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: cV90KyYY2aumv7qYKMq70p9eJoO0jgvOHt4QTkqwYDJa6QsDXgcGFTOqG7EXajP4w+LLOjoeP/n34CpkGxrJxKlW5qd2p1BDSTr7W+boZ8jSacCA/ZbqXvki7CUSMkAPRC3Qm+Ctq3DTrNwSuZUwOoUP6wU2NvRMmRbNT8A/97cflV+O/iQOIqoXzrFbh1e+0rm/qLQ3qwRQfnrrAe7FiYrSRKWybDe/qSxSZav2inCvKOpkMM7kLh7XnhlVkLM7BifmSGbhtF+q1L2Jikh8/rj5+ZtS21p989SZGC/Dk3QwyWXsM8ftzDzXUoCHhiv0PKvA219Ep8693d8lPlkKAF/nXGYQIzaXdDwQFQIw/RiqZXH6uGedqQPObyy5IdeYzy4BWA8Kb5EFveK1q32gkRffGwjaXcwT5CZ/PRmfk/eHowm0KCsjFXQbFkGLVX5GGIZFetdwaKo0l10/jP5OoLldhBnpp0HxdJp3dJXY3O0gswrfvyUxyYQG78D3hOpYFbHl4M+Wz6TWwwavT0HB+FIfx54ocEmjRXUFsnWfDZZRKYNciG/Hp5RhsbVp8S9XIAUyGqtaUpxQGEYNF0Qq4CDpjzHmT8W6RaZE8x5Bp1+YVgEus9+gMeJdhmkHMaoFr1t9Ngsbfi/gUFO8Lbj+qRqEIKR/EqB2ebmp+VU2UQv0uvLAd3BgBOESiiGTASpka6f7N9uNqZLxhCQml/DyaFBypDIC5FEOTsbB89XBGXUu0TR3Haa5fAy4AfxUM+k2Iccxb+4ZPCrECqltrYlu7OslKvwLpt+MhnZvQf5+YJM= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb3a74f4-7e31-4110-da9e-08d7ef6ade8b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2020 14:04:17.9481 (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: FNBhe39dH3QgvQOd6RCjjGH7bLwyzWZL5Tv0m+bjyqYk2q+n8R9CT3SNtJNu/Ra5hxrl9+HTMoxCYd421MxA9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2808 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
[1/4] sata: ahsata: Fix resource leak
|
expand
|
On Sun, May 03, 2020 at 10:27:03PM +0800, Peng Fan wrote: > From: Ye Li <ye.li@nxp.com> > > The reset_sata should reset the sata device info and free the > probe_ent memory. Otherwise, it will cause memory leak if we > init the sata again. > > Signed-off-by: Ye Li <ye.li@nxp.com> > Signed-off-by: Peng Fan <peng.fan@nxp.com> Applied to u-boot/master, thanks!
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index 82fbb50da6..2bc1de8b98 100644 --- a/drivers/ata/dwc_ahsata.c +++ b/drivers/ata/dwc_ahsata.c @@ -918,6 +918,9 @@ int reset_sata(int dev) while (readl(&host_mmio->ghc) & SATA_HOST_GHC_HR) udelay(100); + free(uc_priv); + memset(&sata_dev_desc[dev], 0, sizeof(struct blk_desc)); + return 0; }