From patchwork Wed Apr 12 21:58:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 672752 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 6EDAAC77B6C for ; Wed, 12 Apr 2023 21:59:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbjDLV7w (ORCPT ); Wed, 12 Apr 2023 17:59:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbjDLV7u (ORCPT ); Wed, 12 Apr 2023 17:59:50 -0400 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 4E4593C2A for ; Wed, 12 Apr 2023 14:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681336743; 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; bh=3km+WdaXAxmREOQBluv9G0scwhkQuown0nnjATModf8=; b=ZW4FhH73IJORe0EbZd/OcdSXKhugNDWRzEbPaSVz/7uJJhORkcnYSnT6lF4zrlBBLHa4VQ /jCEKoZfx0c254UloMWkIBRiVBLUYTVNicBV86NJrrnB9/J6sPUUtBIUskKLAispWA8WQk fDLCqDbDx2l38ySGdqXUKSyrbFPtBBU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-WeQVIJeUP52RckcS4WGLEw-1; Wed, 12 Apr 2023 17:59:02 -0400 X-MC-Unique: WeQVIJeUP52RckcS4WGLEw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB78D185A791; Wed, 12 Apr 2023 21:59:01 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D8671121320; Wed, 12 Apr 2023 21:59:00 +0000 (UTC) From: Hans de Goede To: Pavel Machek , Lee Jones Cc: Hans de Goede , Johannes Berg , linux-leds@vger.kernel.org Subject: [PATCH 0/4] Fix oops about sleeping in led_trigger_blink() Date: Wed, 12 Apr 2023 23:58:51 +0200 Message-Id: <20230412215855.593541-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Hi All, Here is a patch series to fix an oops about sleeping in led_trigger_blink() + one other small bugfix. Patches 1-3 should arguably have a: Fixes: 0b9536c95709 ("leds: Add ability to blink via simple trigger") tag, but Fixes tags tend to lead to patches getting automatically added to the stable series and I would prefer to see this series get some significant testing time in mainline first, so I have chosen to omit the tag. Regards, Hans Hans de Goede (4): leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value leds: Fix set_brightness_delayed() race leds: Fix oops about sleeping in led_trigger_blink() leds: Clear LED_INIT_DEFAULT_TRIGGER when clearing current trigger drivers/leds/led-core.c | 81 ++++++++++++++++++++---- drivers/leds/led-triggers.c | 17 ++--- drivers/leds/trigger/ledtrig-disk.c | 9 +-- drivers/leds/trigger/ledtrig-mtd.c | 8 +-- drivers/net/arcnet/arcnet.c | 8 +-- drivers/power/supply/power_supply_leds.c | 5 +- drivers/usb/common/led.c | 4 +- include/linux/leds.h | 43 ++++++++++--- net/mac80211/led.c | 2 +- net/mac80211/led.h | 8 +-- net/netfilter/xt_LED.c | 3 +- 11 files changed, 125 insertions(+), 63 deletions(-) Reviewed-by: Jacek Anaszewski Reviewed-by: Jacek Anaszewski Tested-by: Yauhen Kharuzhy Tested-by: Yauhen Kharuzhy