From patchwork Sat May 11 15:39:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiasheng Jiang X-Patchwork-Id: 13662483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 4FFF8C25B5F for ; Sat, 11 May 2024 19:03:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A0D410E1C7; Sat, 11 May 2024 19:03:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=outlook.com header.i=@outlook.com header.b="JTudANMZ"; dkim-atps=neutral Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2052.outbound.protection.outlook.com [40.92.20.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E77610E1D0; Sat, 11 May 2024 15:39:55 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mUzyGfFwYVR9EOHj9ibv4JMpJw6qPvVYAJBlhHOZBZFfxK7QI/RhkiWGdBdt+dF63GUf9kVCiqFLazr91c1GgLUBFLpPl8/q1xurHPVOJSXHHGlo44fTuJXe8RZ43Fje+pGo4wtwjXlYgTZXx7s+uD8pvV/7NytTRTOMwNKgjvucvoInvdFUbk3H8U5uMVE579apOhgy6n4oAxX+h8fWB0ke7Mv1lRfDHmEKTgNTQe2YEWuph6Fyqm3UHORBQu+qUOJQz3DYzPXyXnyb8s6XcbOKLgtaEak1uXQw1bpHBX495P/bNmPx5Thth4M5ylLG8RQeltq6yfy5gNwok/G1LA== 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=x7f4uynIvVYErYvRnMWtwNPO4N7vH+ouVjoYTZddoEA=; b=ayIyJGSc+9x1nfn6kvPcXw0Jdsc1xLZhwB1wIBUtrshuDRT5sKAGdyLxPsKpz7dWr92rqQpjLa1/2PPllOjegP+mqbYkVxOj1bNBZ7z5y8+QA6G7ZZEGXAJYN8tpB88DbKJ16XcyP9KqAvy0tzXL9SgVDqpbADEJuNwHF/sVBrbjrX07YMC5Zs+nZ+Le1tzSypiU9JQX81WlYcusWcZK2mBRUMs10tI7gL/TIOLDCXkbaoABHcknU9yQvWxflYBKoDjXepRwUenP8ANCFfvxR2bNFkuJiuwq4ONZFh3plfJF3H71uMSKFv0NUZcaIo3QPD4W8fAdKzzTkClwCL+Tjw== 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=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x7f4uynIvVYErYvRnMWtwNPO4N7vH+ouVjoYTZddoEA=; b=JTudANMZyJyttrBN3jBgINB6lV1jHwRrlyYhAs0Ej3tK5eV+PtVZnEklohHCq1v1995n2LJyTuNKFzn1FTbjRK5y9vnIUpDVezCTewCTrzz3+pVCmMpskURhmoM/2hakdKWqB7pMmCtq3QHw1wMgQLIH1WpWdyDGxQklgQLSSf/Q4kR3VFd7ZYgQT9Ct6eM0m1V33cQ2O/8TlB+wjLY79UONd+PTwdvftuxp/vSB3IVYn+g0eJBESxcmm/gPnRRtcNHkn8uZ3OvAIEwt5S/l96stLdHErJaj/5has+1BwVVAILNjpScLepCcPeqv9iVBQnjEhDfzdzYKh5TlmWGCyA== Received: from BYAPR03MB4168.namprd03.prod.outlook.com (2603:10b6:a03:78::23) by SA1PR03MB6500.namprd03.prod.outlook.com (2603:10b6:806:1c7::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.54; Sat, 11 May 2024 15:39:53 +0000 Received: from BYAPR03MB4168.namprd03.prod.outlook.com ([fe80::b8b1:7fdc:95d4:238a]) by BYAPR03MB4168.namprd03.prod.outlook.com ([fe80::b8b1:7fdc:95d4:238a%6]) with mapi id 15.20.7544.052; Sat, 11 May 2024 15:39:53 +0000 From: Jiasheng Jiang To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tursulin@ursulin.net, airlied@gmail.com, daniel@ffwll.ch, chris@chris-wilson.co.uk Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] drm/i915: Correct error handler Date: Sat, 11 May 2024 15:39:44 +0000 Message-ID: X-Mailer: git-send-email 2.25.1 X-TMN: [u03Cg56Kyiw0k4AYqB1HkbCyxfSX9Xk7] X-ClientProxiedBy: CH2PR07CA0043.namprd07.prod.outlook.com (2603:10b6:610:5b::17) To BYAPR03MB4168.namprd03.prod.outlook.com (2603:10b6:a03:78::23) X-Microsoft-Original-Message-ID: <20240511153944.38442-1-jiashengjiangcool@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR03MB4168:EE_|SA1PR03MB6500:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d862075-b8c1-4ab2-50a5-08dc71d09990 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|3430499023|3420499023; X-Microsoft-Antispam-Message-Info: rlA+cyiDyZD6kn5UooEhG41vlmK60EX+E62rGvrDYZ/QYGFu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5jDa1egS0sL8gEBxUrMW1mNv3Qp9upAOkTFG2ZtnUtbV9uIhnb+A5F+AyFjOw2GdsI4Qd61uocljPCo9kdkLAunxjAnG4olDu7VkKAzQPqcRlkLs8YZG8X3rlh1pGlzApoWtY18itgA0gEjMcyZbDuDZMlB9g0RelGReE0m/2/foxqm35y8cbb9jFN02T/bo6RpsWdGo1Irjb95xT5CcMYLAw3gXiKU5TWw4CClCP6LjOe080T614g6hZ/4LEbmAYdG1Z+NlQWtV+Wv+v8Y7Gi69+KCwO9aG74QIO4xZ1RxhH5XEI2iLUHwxILUYv++MQu3v5xgUjoWBX2O13YfoT3vSIZyEmxUteDRBgBNRC4DFVwzNn6vi4UCHBkD5MTsCNZW/Ay0EqbamgXHWn7Cmgi3QDI8i0jC4N9EB2rEg6ECZFJj6Z8sK0XCbMP2aHg8m9thNcmKi451w10Au9dCzKCNGU1XCHVvzZAdFznq7hPQC+lBdl40nlEIh/+ojzp9gjvClrC48kcdhUHnC982slVKv8XD/6lcN1u6zKgB4IKzn77VkrdDbrwCdYGH4A9jzXTsbuKVl9QKgiZhzwQZddw4B+SW4UTKswKe+uc9SObGIUdqxNXdES9CGdz6rjb4zwhjKoiOImu2ZsFvK0gRO0y7NEdUXUYcXSf3uN4pDxErB1Ie7eocmcaqieY3CddNrM7VRPY1PRhBj7S3mvzkRqwz+SvQFZfh2V2bbxmVmjjON+HrvIinrmyJdWSUj2nlCuidjLMLTOJQ60Aoib X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d862075-b8c1-4ab2-50a5-08dc71d09990 X-MS-Exchange-CrossTenant-AuthSource: BYAPR03MB4168.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 15:39:52.5385 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR03MB6500 X-Mailman-Approved-At: Sat, 11 May 2024 19:03:20 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Jiasheng Jiang Replace "slab_priorities" with "slab_dependencies" in the error handler to avoid memory leak. Fixes: 32eb6bcfdda9 ("drm/i915: Make request allocation caches global") Signed-off-by: Jiasheng Jiang --- drivers/gpu/drm/i915/i915_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c index 762127dd56c5..70a854557e6e 100644 --- a/drivers/gpu/drm/i915/i915_scheduler.c +++ b/drivers/gpu/drm/i915/i915_scheduler.c @@ -506,6 +506,6 @@ int __init i915_scheduler_module_init(void) return 0; err_priorities: - kmem_cache_destroy(slab_priorities); + kmem_cache_destroy(slab_dependencies); return -ENOMEM; }