From nobody Sun Sep 14 22:49:45 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97B58C6FA89 for ; Tue, 13 Sep 2022 14:33:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234022AbiIMOd1 (ORCPT ); Tue, 13 Sep 2022 10:33:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbiIMOcj (ORCPT ); Tue, 13 Sep 2022 10:32:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 659D45E662; Tue, 13 Sep 2022 07:19:18 -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 ams.source.kernel.org (Postfix) with ESMTPS id AA9CDB80F62; Tue, 13 Sep 2022 14:17:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03A86C433C1; Tue, 13 Sep 2022 14:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663078633; bh=0u026pqT58oZ4sONs/gvlH4NvnoS731D0/6bWyVkQHo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OxrJQ1Sz3mgFExpV7MqV3WQAvtVkMXkFwo0T4xV9ZH5HMd6cGwNaX8GeDldo+d6j9 qc+pqfMjekiF84IcvNzb8vvZYnZ4oA2A2Ck0NumbyZYgoEq7lTyQ1PVHQh8CDk9U2T RwegtH/dqAM0STiroXHPdxAQpr5iHOSEgvGaZfuY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shigeru Yoshida , Helge Deller , Sasha Levin Subject: [PATCH 5.15 024/121] fbdev: fbcon: Destroy mutex on freeing struct fb_info Date: Tue, 13 Sep 2022 16:03:35 +0200 Message-Id: <20220913140358.382709793@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140357.323297659@linuxfoundation.org> References: <20220913140357.323297659@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 ce699396d6bad..09ee27e7fc25f 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; =20 +#if IS_ENABLED(CONFIG_FB_BACKLIGHT) + mutex_destroy(&info->bl_curve_mutex); +#endif + kfree(info->apertures); kfree(info); } --=20 2.35.1