Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6164418rwb; Wed, 18 Jan 2023 01:52:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXuDI2uHd6uX3ZR0r71pibshlZ2k8WZoA7zvywDvu4iJm1d/rOxYPzQDjd6Hdpv0UXy9dymM X-Received: by 2002:a17:90a:ad02:b0:226:b783:674 with SMTP id r2-20020a17090aad0200b00226b7830674mr6568213pjq.37.1674035577608; Wed, 18 Jan 2023 01:52:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674035577; cv=pass; d=google.com; s=arc-20160816; b=cAnBcnUo9oiThZBYkABVXZvwwSkWBCE/tqy/y7jdghJ3F0bwm5Ewjic1mXuPA6szqw EFfy7QFfL7Jg9O/45QqntCcJtISFAbqINi2uEppsQvvSIqiT3jmSBiOU+352aA4bK0Rq pUJepwwgjEQJh5mluC57Z6EAhVTYOwBJFpp6o89kzDjqbGpBXInl7+n2fFxTn1PLGM+D /d4Co5k7YmMU/sEqIxibklYvhOqBGkC6vvXmM+CP32k4EQrKFgqARFqwHkP2hvoBz8/q Xw2hiqtmbVnNdG7sCG0xJetAcmpjem75uQoi+RbUxKiwUl3ckDxCpR2KQ1ySBeGQLWCQ XAVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=h1ECkoR+3/WDoEQ2FuO44DKpRaxHsDksYpGsGiduLVU=; b=T7a2xUU12Dk02aLbAaL6hzlS0uoOaFXRQ5plUF+iPY8Wc6mEBln7nEgh3t+YP7AxCI meOUkK4QyRoXGB/6kaj1USSXvrfHbKDagI3YlIBjfRP8JAZnacso22y+JVT7dQbt5o+8 Xc6qMMzSJOF18p5KOHq7bk6xVH9yfqKgIS5Xf29h+jQV7gYhpcXdpFc2YUIsBN40CtAE Nh0EBkrdMdy5Zvz9zhwPa8LMJH5xAHhqABUt6R1doN9G9+vn9Rcfwlc1dtcNBdk8q4Vt 1pm+mySLTI8sDeNmZS57Xc+7h0SmZ1MwGPUF+qJ5UN8UvF2ADyF7b02k9/EtA0jSHlhz 6hgw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=t3Qyw1C1; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a63790e000000b0049fb97c2743si34439343pgc.251.2023.01.18.01.52.51; Wed, 18 Jan 2023 01:52:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=t3Qyw1C1; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbjARJfK (ORCPT + 48 others); Wed, 18 Jan 2023 04:35:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbjARJZo (ORCPT ); Wed, 18 Jan 2023 04:25:44 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2079.outbound.protection.outlook.com [40.107.244.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7541577E0; Wed, 18 Jan 2023 00:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bi70F7SfUt7jE+rrB1+uJM/U3c3jKwcBn75j5hcKRpZprOZRSrFgcis+TgLWOMHhJ9xnWK32DPYLcu280YKq56WpgyXdqYeolXjjhnawRcFOb9pD1EKwivTg6c2EgiJHET1GeorQuQ9KGFnHNCD4zWyd+lEwi8ubLm+vW4C2gCOiSiqjfMfpSO4LobO3ZLwmYojTbrb8XaiGpsMywXqgQ3ehkERTKLlU0RbdL0d+JSjGNI9s5b0U4UAUFL2V5trfboYJ/NrrKDjm1JBbTw/MxVN2Fip7pCii4DmkWeGvXT8N+3UtM/jx8sNXa4pPSIHAGBtmClj2rOENcQ+Ssbgu/Q== 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=h1ECkoR+3/WDoEQ2FuO44DKpRaxHsDksYpGsGiduLVU=; b=E7IvKkcjdwbbuUrzNQvHIc5+/nLlw3TlZDvJiUi9HX3bNfhRgEH5klUYNw6YEr5zjK4+EtWJ490OINRWJpKwHax0GdZbZb5G+zDGFriMmxU2IzBXC/UyyEeTbC4PRhAmjnppxYuqzm0MXy00sPUE11Xu/WuZnVvCAOPmX/Or4D1iRfdmxopIwUy+cy0kqx0EqtdjXl2aCrcD/cWmnvvtHvaxhtF6j6h55i7RUKq957RzpDwYjw/xpOFODT8Y4djnm7xAto31RyzSoIFlQZI80hvmHe3AZQIYnKpq2lNl+cDvJt7oVUv2qyjnW/zWT9UmL/+tt/2DSUhIJRvEjrlPOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h1ECkoR+3/WDoEQ2FuO44DKpRaxHsDksYpGsGiduLVU=; b=t3Qyw1C1KSaWtBT05HiL3kJZPNSsWgFWc+SD7Up6y50i1EnT25qUiQbU5gZKLqC/Oqw1g42se8NAAsWTtTblHbkRzwtumwEj87VrYjedjOQUxgUxbaDF/A7wuO0/U/HzplzhJ+S0UQWq1Xy9ZSMsa/tSDiTAnUvfTPszbYoEwBs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BYAPR12MB3589.namprd12.prod.outlook.com (2603:10b6:a03:df::29) by BY5PR12MB4870.namprd12.prod.outlook.com (2603:10b6:a03:1de::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Wed, 18 Jan 2023 08:52:03 +0000 Received: from BYAPR12MB3589.namprd12.prod.outlook.com ([fe80::500a:d02f:5ceb:4221]) by BYAPR12MB3589.namprd12.prod.outlook.com ([fe80::500a:d02f:5ceb:4221%7]) with mapi id 15.20.5986.023; Wed, 18 Jan 2023 08:52:03 +0000 Message-ID: <3c3bd64a-164b-7ff2-ebf0-c8f9c2f94b72@amd.com> Date: Wed, 18 Jan 2023 09:51:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH drm-next 02/14] drm/exec: fix memory leak in drm_exec_prepare_obj() Content-Language: en-US To: Danilo Krummrich , daniel@ffwll.ch, airlied@redhat.com, bskeggs@redhat.com, jason@jlekstrand.net, tzimmermann@suse.de, mripard@kernel.org, corbet@lwn.net Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230118061256.2689-1-dakr@redhat.com> <20230118061256.2689-3-dakr@redhat.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <20230118061256.2689-3-dakr@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0070.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9a::9) To BYAPR12MB3589.namprd12.prod.outlook.com (2603:10b6:a03:df::29) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR12MB3589:EE_|BY5PR12MB4870:EE_ X-MS-Office365-Filtering-Correlation-Id: 7886a82e-8e4e-4baa-df1a-08daf931448f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SEPJWkNN8Q7M/UMg9NbgyC3vLFLyo8zmNUSk4zvVXGgdOPLgXtwZI0o+tsg4KYihdywdXwnBhFbvuuGgvHDGWWNPeH78Xy0rGCqdtq/Zd2uAQye+5rg9jZ+AIOeI1TpwU13sCMbHc6YRcZb7bKkhi0AqTavaQQLNvTnks4roVKEcdz/uikOP6XMPOyxcCxTGaGlKi7A+TPnsbkCbsuKD93SYbPnqt9BD/OqDy7EyXffu+gsGvk1q0BqrLnLCSx2lbdlaWj9YOzXwC+ppQoSa9fFl7tHi9KMMQ8dyZzoNQQ9oCs0xig2PxiQkKfeBM2W+Ep8vJmdIFwy4868ia/IeXpqebUhGlCW4E5JJuhSxipX7vOeK6ptWngmWd9Yh+rZcrcS+D/NliGCr8ICYjG+Xdq6LzLJVSinH+889ijnz17dGITWUj+MDANX63CgEIjMcoTTqcfgkcRE7iS/K11Z+uL9SMtd43Z8A0uV0wPSArgklmO/Y2i/76fv1MZuAIje3md9DKLVpjpP7NoEFmumpzniDHv4pLPajgptwaHo3lG6EgMI+DjkK0dU+fyfi5AlHYy0RGZkPhDkT/uecwhIe7ZIZY8+e9HwM4O47WI9kZjjOlJ0WpSxQVYCRSd+J4+CjJySZO9edXS83a5r0f2Z7cHCzX2Ub0If5o+hj1Nb3R1xlD5OGw5iPCAcDMjZsmc1GU6n79s75JQB1TfCuuN3LS3JL2DTmt7tf8tLq6laCh1U= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB3589.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(136003)(39860400002)(396003)(346002)(366004)(451199015)(31686004)(86362001)(2906002)(7416002)(66556008)(66476007)(66946007)(4744005)(8936002)(5660300002)(31696002)(38100700002)(316002)(6666004)(6486002)(6506007)(478600001)(36756003)(41300700001)(8676002)(4326008)(186003)(6512007)(83380400001)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZTFJYVpQRXo0VEpod1RiNXI2QllYOVlvY1k2RVJLc2tqQmxRTGtBVm9sRWZ0?= =?utf-8?B?Sy96TkFxanh3ZkZQOW1JbWNWRzl5ZWFQai9ZNmtMaGN4a09DTitWcXNaVVNX?= =?utf-8?B?RDI0czlRdFJDOW9qR1BJeC9Mc3k0Z25jK1pzYnpESjdJaWZnUzRadjlIdEpU?= =?utf-8?B?Qzh5K2ErNldCQ0NpSjMrQ0hNdHY2T21YTmI0VC9VV1EyaUpYaHpQTzVIcGhL?= =?utf-8?B?ZnhsUUV0T2xyek9qb3ZmUHNzeWdtaDcyNXc5SFpNMDFCNTdlaUxnVHNCZXRt?= =?utf-8?B?Vmo4Q3o4eW1taVVJbG5EcU9WQit2ZG9YVnhvcCtiWWZ3a0dDQmtQR0t1U1hx?= =?utf-8?B?QjB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0IxcDZybFlR?= =?utf-8?Q?sXiqYQJcw0fWrRZxLJ48n1F6SDFfo9heCvn8Cq1F19tO?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7886a82e-8e4e-4baa-df1a-08daf931448f X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB3589.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 08:52:02.8308 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9RVMhxuegYjd4hRk5bNnOcGR6v9SbwxP05r7rEOs2QRmQOvHZa4H2sqvW8L4c2De X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4870 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org That one should probably be squashed into the original patch. Christian. Am 18.01.23 um 07:12 schrieb Danilo Krummrich: > Don't call drm_gem_object_get() unconditionally. > > Signed-off-by: Danilo Krummrich > --- > drivers/gpu/drm/drm_exec.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_exec.c b/drivers/gpu/drm/drm_exec.c > index ed2106c22786..5713a589a6a3 100644 > --- a/drivers/gpu/drm/drm_exec.c > +++ b/drivers/gpu/drm/drm_exec.c > @@ -282,7 +282,6 @@ int drm_exec_prepare_obj(struct drm_exec *exec, struct drm_gem_object *obj, > goto error_unlock; > } > > - drm_gem_object_get(obj); > return 0; > > error_unlock: