Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6016473rwb; Tue, 17 Jan 2023 23:23:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXtqy4xdP7qOiQ5ZMY4OVazv1/9EjXPgKt8kMe9hzrIlvpnIU4VNd9a+4SYhlhK8fWHb6UT1 X-Received: by 2002:a05:6402:388c:b0:49a:6a2:6f2f with SMTP id fd12-20020a056402388c00b0049a06a26f2fmr6809117edb.4.1674026597660; Tue, 17 Jan 2023 23:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674026597; cv=none; d=google.com; s=arc-20160816; b=HFaETz3nvHlTsm1Qyo2H3BTSraSpoHdF8tNm//2RJ6yQgbAnV9zeP+IJ8JCCr5b7C7 5w14B0pURufuDsV0K2R6Y0a86EoobGQNN8v9+hZW3+7Xt/RWKghoMnccuwS6QA9A3mwd XxdPXx2uNS7MUp0FgfAhW5t5JqKFWuxvpSaCq5sif2wBrZCxbU32hIehI2/BPSkq2Zdf jKhHKN0nPYg00FZzvYCttT9Ac7gsEZMRHSbBZ9U97KFkLJ6tu3GEWszeEqwQTACMdBlq rN+MepH2P+2R/W0Sp1P4Jg7R7Ep58jhqY8RtEpD8wAG6NtXciukDY3mJubahLEq/mC4O XL8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9bPNRTAzSirKPyPC/a7kemJ9gbWhkHOBWemjVPOdr94=; b=RU8lTlSIYlnefir9UdI68wXZ2otDOgCDoiTEmcyjnfBaTFO84FvxljURr5sMVSN/k/ rZB7otAf0g/kUX9GdVjOjhQYGcObYILFta5Af5AI9cVBusM/qsyyysD/wEFs4XKMdP/O x9xf0V9DFYmMSWSKWFzGem1PSjIgjgGpui/aPzJdufHRuuY2gDofnUJ2jmAmLXAqWI3h FM5PotnoxjHhIxu25vq13tCX310mznBA+y9sqtrue4UyLtzLamQv7NW8eVDi8/FGGQnU //3Q77Kt7qeYQad1/YE3kTQDdNyyZClboFOY9yVTd8pyIv3u1Kl98Z6Y2Tb3eWHSyudh F+IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D5XLcIm3; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020aa7d5ce000000b0049b63678b52si12032312eds.516.2023.01.17.23.23.06; Tue, 17 Jan 2023 23:23:17 -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=@redhat.com header.s=mimecast20190719 header.b=D5XLcIm3; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230224AbjARGua (ORCPT + 46 others); Wed, 18 Jan 2023 01:50:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbjARGYO (ORCPT ); Wed, 18 Jan 2023 01:24:14 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B459951C4A for ; Tue, 17 Jan 2023 22:13:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674022413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9bPNRTAzSirKPyPC/a7kemJ9gbWhkHOBWemjVPOdr94=; b=D5XLcIm3F40BezvWsfnmWbzGJQPArQIhha6JyaGO1z9qb69iD63RiJ1x83bU/7OX7+Ny7b /hr/jFrx1LEhcDFvS9d8jrX2TiOXWnKXq5DcK8unDmQvCzUUQNCa/Gp2lXABMbQsTAmRKn 8XJDvQZ4cldQV3Nb0c2F9rUaYYrd8ZQ= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-621-75qeEFwnO1WKGnZ3uQfY3A-1; Wed, 18 Jan 2023 01:13:32 -0500 X-MC-Unique: 75qeEFwnO1WKGnZ3uQfY3A-1 Received: by mail-ed1-f70.google.com with SMTP id b15-20020a056402350f00b0049e42713e2bso1687686edd.0 for ; Tue, 17 Jan 2023 22:13:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9bPNRTAzSirKPyPC/a7kemJ9gbWhkHOBWemjVPOdr94=; b=yBDUFji8lJj1oF6eM8Y+zukkmTA5lX+Pg9fL1fBH3NVjD+seC7MIC0mldmUkSomZZS zx+IWi9BXUeA3i9ynma0TZYecvPLNCImtspsP2hdFaT0FJ8QuQ71W7lLuvbflXgecPPa fcvtN9mmnn2yF0c62Y1boxEV21ObKVv90WVXVKF/IjYoASwnPOEaX0kintnYF8E1sKs1 V2Pkd5UOsJTQGFX19KswYxWVIR14McSDjVFuO/vgLnawTt1xZ+K1BJzOfslSZ72/qcBt wZrkR0PDgnxLTm6rKX4gsyU4l0B6QX4ns5a68eCO69+EnXlKF6H5gmb+aH3YBUEPgGFh 5OPA== X-Gm-Message-State: AFqh2kqY4+oH7mOZoXUi00qaBxjOkN9FptK2tebHxXb/FaMNituXbn5R dbSimm4KPUsWv2oA9PxxBLimmOW6YC7vIWo7Hbz36hvpX0iqWQktamYCe77X3rw3HwQWXb0aBE1 bJM8QCVKtm7vS+huxlNC047WF X-Received: by 2002:aa7:c0d4:0:b0:49d:9bd8:6253 with SMTP id j20-20020aa7c0d4000000b0049d9bd86253mr6311446edp.17.1674022411762; Tue, 17 Jan 2023 22:13:31 -0800 (PST) X-Received: by 2002:aa7:c0d4:0:b0:49d:9bd8:6253 with SMTP id j20-20020aa7c0d4000000b0049d9bd86253mr6311429edp.17.1674022411580; Tue, 17 Jan 2023 22:13:31 -0800 (PST) Received: from cassiopeiae.. ([2a02:810d:4b3f:de78:642:1aff:fe31:a19f]) by smtp.gmail.com with ESMTPSA id y11-20020aa7c24b000000b004954c90c94bsm13745667edo.6.2023.01.17.22.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 22:13:31 -0800 (PST) From: Danilo Krummrich To: daniel@ffwll.ch, airlied@redhat.com, christian.koenig@amd.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, Danilo Krummrich Subject: [PATCH drm-next 02/14] drm/exec: fix memory leak in drm_exec_prepare_obj() Date: Wed, 18 Jan 2023 07:12:44 +0100 Message-Id: <20230118061256.2689-3-dakr@redhat.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118061256.2689-1-dakr@redhat.com> References: <20230118061256.2689-1-dakr@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 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: -- 2.39.0