Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2567565rwb; Mon, 7 Nov 2022 15:06:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM7EL49nwZooRJFaorwBUzUujwwC5qD7fXD+f4hAYZBEpvCqRGR4Z42qbA3UURL/5D2FXPI8 X-Received: by 2002:a05:6402:518a:b0:464:5ec3:c5a with SMTP id q10-20020a056402518a00b004645ec30c5amr21649429edd.90.1667862369210; Mon, 07 Nov 2022 15:06:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667862369; cv=none; d=google.com; s=arc-20160816; b=g7wzoYz2sw6MqJVhaAyeh2Bomd+u+Mw/XeUr032fsM0CqPcyGsQ11v0wSnS7ohI+SA Cq3vFZmR9UB8vdaVMJLzlS95fUFx52INCFoSFp17SsPB4prH5EfTN27cRIWzTKWtDng8 jEmhuDxbBZ/45TpCFJgsCkJTsax2dsME0mH3IyYfD+BjemTMq484T+rPVyWDi0fibHgw TgoNSNxizI/CqA9oMprtX6UHRGq21mC/eH0lIi1EDOpQa1h9M7WKMO2fyCGOT0vhIIAJ uuRRzjl/5Fvqq5IZT8qyiXwXAfKZVf11ryVSiDpDzLVwg4ix1PqeaXlmjFJ/WagBH/DO 9jkw== 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=N58UJpNNAExktwhfZVLTshsZnQ2VVILEtn44kEC8lhE=; b=V60blCuX81XKeoIr+5RqNldfDz178M4Cyh8/1oXNOg/wKPU8/2Xj/6MGXghU1Lp6cQ 0ENXLIy1XggE6npEVWhNFFBMJKdCcFnEWmK26B6HGae9d3Yz2FG4vaK8F6cbK35UJX6l bjgpte0OEmRA7FP9LyF6VwZ93UOsSFgOCtPdf/hl797PZFwYua2mlA8/ChaX13WOjVQ1 aFWj+2oGc2rUJmUjlFMoDWulZSwH6S4lMvOknUe+L1Q8m8FJBKlpD6dRxqxpgCi6SCpo L/7dZRbYTyAB8uMTrxFjmaGndJhw9ShPdKx9NdiUPuJfooswvqN4bFNa2kc7mpnkfRRK atvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=aBTAUl7E; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go15-20020a1709070d8f00b007ae743c61efsi2901456ejc.1002.2022.11.07.15.05.46; Mon, 07 Nov 2022 15:06:09 -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=fail header.i=@igalia.com header.s=20170329 header.b=aBTAUl7E; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232706AbiKGWsv (ORCPT + 92 others); Mon, 7 Nov 2022 17:48:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232679AbiKGWsm (ORCPT ); Mon, 7 Nov 2022 17:48:42 -0500 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D86192AE1D for ; Mon, 7 Nov 2022 14:48:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=N58UJpNNAExktwhfZVLTshsZnQ2VVILEtn44kEC8lhE=; b=aBTAUl7EESx7XqVKDnD6YS7wbj 8/vNDRacf5mqYJTrbPEn+ZEhFXJmKIZAq537t3odJDE2x9hKTX4hzTkK7xoRewIxuTHz8ZvfINQrM 8trMpHc+FYEYh7MumOFYd1uACya663nsFCtK+imVa5c8s5MUnC/OMtBVwau/H2gHIgO72gc6C/R30 0TIQq5EfB2xhLe/DIl5cY16ASG6VjyDD6zFlb2o3GUfMdcSSLVuaQJdyZ72u60AfEzfC6UG12gsOq nRz7jSuoVzZvGAH3/X8FK7M3fX26tTWljUqPeUX93a5wrs4tpIao/81IOQvcYU8lPh9l+dowMw558 AvVFSEzA==; Received: from [177.34.169.227] (helo=bowie..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1osAuz-00E9qX-5g; Mon, 07 Nov 2022 23:48:37 +0100 From: =?UTF-8?q?Ma=C3=ADra=20Canal?= To: Melissa Wen , Emma Anholt , David Airlie , Daniel Vetter Cc: =?UTF-8?q?Andr=C3=A9=20Almeida?= , "Juan A . Suarez" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Ma=C3=ADra=20Canal?= Subject: [PATCH 2/2] drm/v3d: add missing mutex_destroy Date: Mon, 7 Nov 2022 19:46:56 -0300 Message-Id: <20221107224656.278135-3-mcanal@igalia.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107224656.278135-1-mcanal@igalia.com> References: <20221107224656.278135-1-mcanal@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 v3d_perfmon_open_file() instantiates a mutex for a particular file instance, but it never destroys it by calling mutex_destroy() in v3d_perfmon_close_file(). Similarly, v3d_perfmon_create_ioctl() instantiates a mutex for a particular perfmon, but it never destroys it by calling mutex_destroy() in v3d_perfmon_destroy_ioctl(). So, add the missing mutex_destroy on both cases. Signed-off-by: MaĆ­ra Canal --- drivers/gpu/drm/v3d/v3d_perfmon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/v3d/v3d_perfmon.c b/drivers/gpu/drm/v3d/v3d_perfmon.c index 48aaaa972c49..292c73544255 100644 --- a/drivers/gpu/drm/v3d/v3d_perfmon.c +++ b/drivers/gpu/drm/v3d/v3d_perfmon.c @@ -113,6 +113,7 @@ void v3d_perfmon_close_file(struct v3d_file_priv *v3d_priv) idr_for_each(&v3d_priv->perfmon.idr, v3d_perfmon_idr_del, NULL); idr_destroy(&v3d_priv->perfmon.idr); mutex_unlock(&v3d_priv->perfmon.lock); + mutex_destroy(&v3d_priv->perfmon.lock); } int v3d_perfmon_create_ioctl(struct drm_device *dev, void *data, @@ -177,6 +178,7 @@ int v3d_perfmon_destroy_ioctl(struct drm_device *dev, void *data, if (!perfmon) return -EINVAL; + mutex_destroy(&perfmon->lock); v3d_perfmon_put(perfmon); return 0; -- 2.38.1