Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1182102rwi; Wed, 19 Oct 2022 07:36:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4CxW3c5O/6j/h9rWZy4+J39NeYF/rSpoSxp55JyfLdl4/iav+fLXkLLgVXOy8ecfJUVG4Y X-Received: by 2002:a05:6402:5191:b0:45c:dea0:2c7 with SMTP id q17-20020a056402519100b0045cdea002c7mr7648947edd.239.1666190214605; Wed, 19 Oct 2022 07:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666190214; cv=none; d=google.com; s=arc-20160816; b=TYCnkXKw/Lm6D6NpYnDv/VyTG+khpUlVmKPYg4Ms5nQHHJdazFlOfPySkdbsdN3d1Q IJx16Lq6TvPfwmS8xVB2zTKaW8LQvN591OophvOvsX9cJgoiXczApmn8lVIQlL6rM64o y07MEBXDvMKYDus6FPHkHmN3HoJrlK8tSewBdy7hnoynvMA6Q6ZcVV9Bgdy+m3EWSMFA 3HOXKWx4OD4p0PLqo6vQMy0vOqzioxSWfBr1HFDanjCxZut5GlDorNByDFswBerg00DB BaoFvTDo2P2ZjM3zz+840DnCHN8Bn24HYRnMA0Rl2jq9rmoqyzi6gyc/pvRHxIf3E4T6 M/mg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qsY+PlN+INru3sODjU8AcjnXAP2aCl71b/S2vrXuI1w=; b=KCeJRNwAnU61+MUPlu6H48G61ciPbDWunTo2LG8DMxd4mN9mv6OV90sQ9cmNVlyzMV pjTp46XRe7TuqO72Aguck2egUHy0kiQ1D91BI5wRcjKAj6tjIZVIVFhzXNI9YfMOsjoc ojGmU24hSZ4hZurhU1ir3/6oTGB/q5myPMKyChBVavRTLM4K/PzA5IP1KJFr/dx8Jam8 gCENekGlMqbDVvy70B7L0ZFgWGptAFi+UG5o9xdmm021HcxLVM/+mb+2TRgets8oxgaO 3/ocXAAJF0u61Y+n/mAmMXL1AdLF0m5K+cBDbjL5WBUXKfOMpB41CVmOYzmWjM9nUvo0 XPfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RTv9l4x1; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he6-20020a1709073d8600b0078d9c781853si14815348ejc.607.2022.10.19.07.36.28; Wed, 19 Oct 2022 07:36:54 -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=@linuxfoundation.org header.s=korg header.b=RTv9l4x1; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233485AbiJSNs1 (ORCPT + 99 others); Wed, 19 Oct 2022 09:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233204AbiJSNq6 (ORCPT ); Wed, 19 Oct 2022 09:46:58 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 553C450514; Wed, 19 Oct 2022 06:32:24 -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 sin.source.kernel.org (Postfix) with ESMTPS id 84E4DCE2100; Wed, 19 Oct 2022 08:50:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83368C433D6; Wed, 19 Oct 2022 08:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169415; bh=oyGyxWJUXiy5R6FcVcV6T7cfpWGfVqEQbstwhBlVSqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTv9l4x126g/Q0yfxj8jONoZe4S3tFs2/qwehXhZx0RpaEs0f9PTxsgI56szSbaPo aosxKolWjsF9uI+xL7+4D5MxXzNmNw+QIUm1xUdOHiKQ1h5EL5BMbW1CKCqg0po750 eCsrHbIfvzCPLmOnmBhAqa5gdWuVhceKf2LApmCg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Machek , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Wolfram Sang , Sasha Levin Subject: [PATCH 6.0 234/862] leds: lm3601x: Dont use mutex after it was destroyed Date: Wed, 19 Oct 2022 10:25:21 +0200 Message-Id: <20221019083300.374919732@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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 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: Uwe Kleine-König [ Upstream commit 32f7eed0c763a9b89f6b357ec54b48398fc7b99e ] The mutex might still be in use until the devm cleanup callback devm_led_classdev_flash_release() is called. This only happens some time after lm3601x_remove() completed. Fixes: e63a744871a3 ("leds: lm3601x: Convert class registration to device managed") Acked-by: Pavel Machek Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/leds/flash/leds-lm3601x.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm3601x.c index d0e1d4814042..3d1272748201 100644 --- a/drivers/leds/flash/leds-lm3601x.c +++ b/drivers/leds/flash/leds-lm3601x.c @@ -444,8 +444,6 @@ static int lm3601x_remove(struct i2c_client *client) { struct lm3601x_led *led = i2c_get_clientdata(client); - mutex_destroy(&led->lock); - return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, LM3601X_ENABLE_MASK, LM3601X_MODE_STANDBY); -- 2.35.1