Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp437629lqh; Fri, 31 May 2024 06:11:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgd1p6pT4vtk0JehsqAC7O5IKWrv+r+p5A9Li/Y+eKZFKQPUukov61c7NMPO067gz6O9ieXAmxMB7vb8rx6GlFmtgNUnlFVr/cGmwC3Q== X-Google-Smtp-Source: AGHT+IHogqcpkANmDj2YWvlQtLLkmklsPLvli6wb7okc2obyN1hWa4o6k18xm37m1837XsbNG5EC X-Received: by 2002:a17:90a:e28d:b0:2b9:e009:e47a with SMTP id 98e67ed59e1d1-2c1acc3d22cmr6926538a91.10.1717161114635; Fri, 31 May 2024 06:11:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717161114; cv=pass; d=google.com; s=arc-20160816; b=bvg6NhOx27Nb5O92mwh07jm+QIQ8Ib1TtdpPyk5SiTzxGR436CpKR4fVbAbQtRhoSs CcuZSg4hpQlk0rhWvUNO5lnQd+Z3VGzqrkR5kFFWV1iaVwj1IWMCdz2YDrBOPwsPfqQE 6jUXqcb4T2tgI02/veRIxGWlFyzz8IlVBdLhrEe357KLjUh+3gLwWZoZC9RQe7wN+yHl KBx5odtvJNB3VDuAWtS/zMWfYyGiJ6cgOt9u0C4qSzVbdGTxIyrz9cx6jogeQoFfM5J4 00nu93MfGP7LlV2yxFzGmaeM1ltj5CHOgtLFmsi1zXgEQnmPQWIBSMJI0a3IGEoWY0yJ bWkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Px56jy9il/IYwkPayrMIkBySKFiPmogiNfHl+A5skDU=; fh=ZKbKaQm97eCeIc5L6xAZCPDOQLjFfOuh1WonSepMWVo=; b=DWg2EsB2TPjiZK9dX8v3G/gNOJfFwTRm4Ud6yYtQWe6QZVOXJm0P8vXPBM9+XO514H 08rJuethzKn9N+SzGQ2MzhM1WabrgU5q68JEHiO4jndLaccm9wzA0iYRk3o1peKRKuRk FBccoHUx4ggSs8vTyUiFJVGlLeCJdM0ybL7oFnyAEIzXmuG4R10gCLGtRy13wFfWrwe0 Z6UsjVvyXCBJi4WZF8XC0CYZSwpaFCGY7cubrrHOeP1WvJGVG9Mva7J9QENj1736fp5G o23VJ52Ill3oiF3fO15Qeky9MBXBhICafe1XuLWK5xEyfD2fHXDQ5ufFFkQONhMZ+23w cv3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VsWS0fjg; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-196846-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35b222fb0si1583210a12.463.2024.05.31.06.11.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 06:11:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196846-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VsWS0fjg; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-196846-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3C7AE282D85 for ; Fri, 31 May 2024 13:11:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45EDB158A0B; Fri, 31 May 2024 13:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VsWS0fjg" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E76D4158A14 for ; Fri, 31 May 2024 13:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717161082; cv=none; b=PXucNJyj69GOY8bQhLyO6Hu8DxfciTWvUfBx6R7eGEwqmDuLQwn6rQsZJzLyCeYHW96nIfcyT3MX8ewBkMO5999PbNWdUuSjIjeCaPl9LRTph2yEOTnBihp5IY3jCOXzSp/WlrN/jYxpwt/aRIZPIc37glsFsypcpYEUO2drttg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717161082; c=relaxed/simple; bh=c3XdctI4qUJlJfz5ADlPYS/uW7u8v1FB/rMrC5LHkds=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J2lSGO8kpzZBVeRu/oYnLjhFs/na+01ATrqm8W1gDVesIImKWynIkDa0rFog5gkIysLKyk7bJY6XwsmKkHaOvOzkoMnnNaOKUPHQGK4bFN6npQilEKxcK+5xugVaLrP6Zz4oTRJN39Us8uIg0yUhofcLF48ilO2hfjgF2ls1bJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VsWS0fjg; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717161079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Px56jy9il/IYwkPayrMIkBySKFiPmogiNfHl+A5skDU=; b=VsWS0fjgShR/OgeiVF+dMjd90ZryTNSZExTJ4NSq8TxMDgVxS3cAiWxGZXOO0+Ok7Yq+Tn 1EIb1gWN6zB8rCNAVelz8oKoOz+bd6c0iAKhu79IojSY1eSQcF62NH4hrTcKt1yYRKhDod 5edjcaiqtQhzKibW4s3F4ZPX3crxOnQ= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-225-QNPI0xSQOuuq40B6MsgdHA-1; Fri, 31 May 2024 09:11:18 -0400 X-MC-Unique: QNPI0xSQOuuq40B6MsgdHA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a62c4ffecefso94370866b.2 for ; Fri, 31 May 2024 06:11:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717161077; x=1717765877; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Px56jy9il/IYwkPayrMIkBySKFiPmogiNfHl+A5skDU=; b=Uf3m5Q4MQHfnIYJ0XsS8ij5JvVzUcW01LC/25ab7oZ9kiSFKbLNGoETZgFgwkH+Dtd cT3aqwTEvxfQKfx1+5afl9JPZ+G/dAwbhUm2mj37mD/JM2CdgnK5j9+Ygm7CuWQ9kW/T 5dN4znZg+hevKi1KzMzxC/q0uznHSoNoqg05e6mQT/3AFW4MwpFPI38Vy+Et+QOZ/Swn l+d7UO/N2y74k1Ar1CjDQeycrd2FUC4xHlnHoIAjgRJR4voQktTCSI0WRGHGK7g8d5PK M+kK9cZ94919htbZiUMmZgpYPsGGEZL30DyyQV+InqaO6q9PZMHtlFM47796wASRNqiW xpmA== X-Forwarded-Encrypted: i=1; AJvYcCXlW27ECT6uq9Oz6xAoK75zXftPm8MeDYtHFunIdLlAqJadRoH93HxGLjz6bBULSLfqU+X/2PBDjeelffz5oJ3ncw4p3PywMWUWmyf/ X-Gm-Message-State: AOJu0Yw/vuIR4xdIaKGbmlyTd9mKWLQeKiKhJGJ6DFRlpX3OYRADBhP8 LEtVj3+TPi5N/AasbGEMciHh0QIot1poy2ovAavFEZETOTW1Qj6j7ELfUWYHhY7+iuudomUgBnN qiW7TtYwn6Y93YsW3AcrIgsJ1Udelt7vH1Ikl5XM8ziCg9oMrN2Wo5ePIA8idrzmdddZE1w== X-Received: by 2002:a17:906:7ac7:b0:a68:13d8:3d00 with SMTP id a640c23a62f3a-a6821f4e6d6mr150501666b.56.1717161076967; Fri, 31 May 2024 06:11:16 -0700 (PDT) X-Received: by 2002:a17:906:7ac7:b0:a68:13d8:3d00 with SMTP id a640c23a62f3a-a6821f4e6d6mr150497366b.56.1717161076394; Fri, 31 May 2024 06:11:16 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67e73f9b84sm85694766b.64.2024.05.31.06.11.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 May 2024 06:11:16 -0700 (PDT) Message-ID: <2a6045e2-031a-46b6-9943-eaae21d85e37@redhat.com> Date: Fri, 31 May 2024 15:11:15 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Hung tasks due to a AB-BA deadlock between the leds_list_lock rwsem and the rtnl mutex To: Andrew Lunn Cc: Linux regressions mailing list , Pavel Machek , Lee Jones , Linux LEDs , Heiner Kallweit , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, johanneswueller@gmail.com, "Russell King (Oracle)" , Genes Lists References: <9d189ec329cfe68ed68699f314e191a10d4b5eda.camel@sapience.com> <15a0bbd24cd01bd0b60b7047958a2e3ab556ea6f.camel@sapience.com> <42d498fc-c95b-4441-b81a-aee4237d1c0d@leemhuis.info> <618601d8-f82a-402f-bf7f-831671d3d83f@redhat.com> <01fc2e30-eafe-495c-a62d-402903fd3e2a@lunn.ch> Content-Language: en-US, nl From: Hans de Goede In-Reply-To: <01fc2e30-eafe-495c-a62d-402903fd3e2a@lunn.ch> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, On 5/31/24 2:54 PM, Andrew Lunn wrote: >> I actually have been looking at a ledtrig-netdev lockdep warning yesterday >> which I believe is the same thing. I'll include the lockdep trace below. >> >> According to lockdep there indeed is a ABBA (ish) cyclic deadlock with >> the rtnl mutex vs led-triggers related locks. I believe that this problem >> may be a pre-existing problem but this now actually gets hit in kernels >= >> 6.9 because of commit 66601a29bb23 ("leds: class: If no default trigger is >> given, make hw_control trigger the default trigger"). Before that commit >> the "netdev" trigger would not be bound / set as phy LEDs trigger by default. >> >> +Cc Heiner Kallweit who authored that commit. >> >> The netdev trigger typically is not needed because the PHY LEDs are typically >> under hw-control and the netdev trigger even tries to leave things that way >> so setting it as the active trigger for the LED class device is basically >> a no-op. I guess the goal of that commit is correctly have the triggers >> file content reflect that the LED is controlled by a netdev and to allow >> changing the hw-control mode without the user first needing to set netdev >> as trigger before being able to change the mode. > > It was not the intention that this triggers is loaded for all > systems. Right note there are really 2 separate issues (or 1 issue and one question) here: 1. The locking issue which this commit has exposed (but existed before) 2. If it is desirable to load / activate ledtrig-netdev by default on quite a lot of machines where it does not really gain us anything ? For now I think we should focus on 1. Still about 2: > It should only be those that actually have LEDs which can be > controlled: > > drivers/net/ethernet/realtek/r8169_leds.c: led_cdev->hw_control_trigger = "netdev"; > drivers/net/ethernet/realtek/r8169_leds.c: led_cdev->hw_control_trigger = "netdev"; > drivers/net/ethernet/intel/igc/igc_leds.c: led_cdev->hw_control_trigger = "netdev"; > drivers/net/dsa/qca/qca8k-leds.c: port_led->cdev.hw_control_trigger = "netdev"; > drivers/net/phy/phy_device.c: cdev->hw_control_trigger = "netdev"; Well those drivers combined, esp. with the generic phy_device in there does mean that the ledtrig-netdev module now gets loaded on a whole lot of x86 machines where before it would not. On one hand those machines are plenty powerful typically, so what is one more module. OTOH I don't think many users if any at all want to change the hwcontrol mode for those LEDs... > Reverting this patch does seem like a good way forward, but i would > also like to give Heiner a little bit of time to see if he has a quick > real fix. Ack. Regards, Hans