Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4511998rwe; Tue, 30 Aug 2022 11:24:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR6FcX6eIisbLQNxavONEvlK2u2KVwcP3TBANtPAv/iQvfM41Z8BtVVLh3BTMd2IDuUx4nBW X-Received: by 2002:a17:907:2ccc:b0:741:990f:fe48 with SMTP id hg12-20020a1709072ccc00b00741990ffe48mr6931644ejc.390.1661883895338; Tue, 30 Aug 2022 11:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661883895; cv=none; d=google.com; s=arc-20160816; b=X6c7rR619Xv76Qv8vSXTmZr7R7cPXt+HxOAjm9JegsZ1jbKL08E2gCBwTpQbafeoyY SWNUEKjukXJwGLCAcARfhMe4Zq5NYLdLamFHjcwhN3XhGLcGMjchH8X2ezVds29pqY2s 4zl5LV6HAYl8RtQLQMkvB8OxjN4XWb5gJ7tk93AUM+zYFZ7ZLmypMThqBsycap+ORJ3j dwiTF3A+/AqEc5PHi71lwpK/272Us4fflawYS+Cvr2SKlwe/whQam0D1S2UaaOWkxj7+ ujQhlmImVQ52gpVEjweitC478soE8yEFXmKWyJCGcAIZoKAKR0/CAmR6GDACxWU797fn WyXw== 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=H/dPxmrXkekruadKB+/UHwa0kmQTg0mHArhLBnvkx40=; b=unZF2bTQtIljeacr2UEuao0a6ByqdJ3Q8MOVmrmknn/ZWN7acq7wgHbrY1i/TpHvRg RTLQJsd6qrr2W3PTpxxqZDzY2AsAJzHvsGcDuBDZMazQhJswhs0hMtnA+qxUtrRIqpqP fTx3RASV5AVvmnnv9k4g713TFT2XugXb+AfUmj5DVHeICByWo/n8MPHwdjfkc88L3Ju3 A6dtr3yyFAGlgVXEdYfh/KjFt5zznU37QzJJVdmduuySe8EE4WreUESGf9FACY4dz+2a KoouoYoumELZ/S5ZDdg0HxXhnV1MmGWlkXhNGumNs9nt5hDQ7nxr5lWyrx84uok1UoDX ZBOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mcA7kVhb; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xi4-20020a170906dac400b007413403eb84si9447382ejb.197.2022.08.30.11.24.29; Tue, 30 Aug 2022 11:24:55 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=mcA7kVhb; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229573AbiH3RXf (ORCPT + 99 others); Tue, 30 Aug 2022 13:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231396AbiH3RWr (ORCPT ); Tue, 30 Aug 2022 13:22:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1BE8F72F7; Tue, 30 Aug 2022 10:21:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ED2CA61775; Tue, 30 Aug 2022 17:20:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FACFC433D7; Tue, 30 Aug 2022 17:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661880059; bh=zneAbTP5pou8p5X4jgg4eabYrBfqHrjpDXDezHwggak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mcA7kVhbZoxJslRWTloppfylEyunXU8ezZNM1tDwpeoX1TwyCclnzJIadF5pTC75Y aGWGszK+3EM0/h2UJVx4+KH8+/s7dsWk3D43bq5EWrnRVZi13/l/X7Eqhb/H4zR90r O/vIKjm+oCKPi85zo1GJT6vJcW52WDQg/rhsMPMvz6P3cSDXUM9C3Gmv+uKZmvH4HC HD3cxThS6oeG+idu1vTmu+SccspOUp9I3W7h8k4x7WUZ8miG7BrByx5MJTfKHgvZmX hg4ZyJqSKxR8s+StUKoS8py3pKU7pB6ZuQJ83FETzsrI/GhwTrKd5RaeyVwOAcgEeX afR2mTnKu+gJQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Shigeru Yoshida , Helge Deller , Sasha Levin , daniel@ffwll.ch, sam@ravnborg.org, tzimmermann@suse.de, javierm@redhat.com, wangqing@vivo.com, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.19 29/33] fbdev: fbcon: Destroy mutex on freeing struct fb_info Date: Tue, 30 Aug 2022 13:18:20 -0400 Message-Id: <20220830171825.580603-29-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220830171825.580603-1-sashal@kernel.org> References: <20220830171825.580603-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Shigeru Yoshida [ Upstream commit 58559dfc1ebba2ae0c7627dc8f8991ae1984c6e3 ] It's needed to destroy bl_curve_mutex on freeing struct fb_info since the mutex is embedded in the structure and initialized when it's allocated. Signed-off-by: Shigeru Yoshida Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- drivers/video/fbdev/core/fbsysfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c index c2a60b187467e..4d7f63892dcc4 100644 --- a/drivers/video/fbdev/core/fbsysfs.c +++ b/drivers/video/fbdev/core/fbsysfs.c @@ -84,6 +84,10 @@ void framebuffer_release(struct fb_info *info) if (WARN_ON(refcount_read(&info->count))) return; +#if IS_ENABLED(CONFIG_FB_BACKLIGHT) + mutex_destroy(&info->bl_curve_mutex); +#endif + kfree(info->apertures); kfree(info); } -- 2.35.1