Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2918213ybi; Sun, 26 May 2019 10:23:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaagGf+eRgfk95Mec33Kmw2HVllxsYNJPPEVB7WpODwMx7ysLIgxaumY5taCtCEoOm3mQc X-Received: by 2002:a17:902:e40a:: with SMTP id ci10mr75499618plb.195.1558891399283; Sun, 26 May 2019 10:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558891399; cv=none; d=google.com; s=arc-20160816; b=AzmKrerEBz7IqRG0d53g3fbT1fmLOPwFU/Hu1CQXL8AR3p187lXuDU7CqPBRGdlEV3 a/X+pJrEyA6sVDDanbg1Bz+e87RGDiFMIUwxcwRGJlcx4df1z5FZjxLopJHO6N6ppbCL O19l0Ywjk6bfi4ueT+uk+bsGsdrTTPUQamrP/ZzSOeNAKPkSYET6uBEpIWv5h+kCEe6q 0q7TMyAB3zuhjYaYMeGyNOrwBaYAA0CnxFNX52rGGd+EJ4pb/e59gHw60foInRW2wkiW bHZdWw19wbeew5XzDHSPL3fbVr4KWtKfY1JnmzsPbOdohUHPSckz78BlDlDxiz37W0Qm syvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TdIAfXU4t45VV+wkaN5FSmMJ5YAoRzB52LaL3iXLOiY=; b=KE3iKblWXoRDLG6fVgjv4uzCJw3w5XN8Vt1Q6+/yOPXcIzqR/XXpuGWSQOg8XcdlA+ MRxH1kkp1XmmC4XWmUrt+BpMqehpGSi1I5uTXssqk9ezJsSPH1i0d4itljJrk7lnNJaN Ys/8WVi80X+78H1GJP/o+wbD41mxtSXZN2FsdAhOWnPNt4PXhlwY0/MOPpXYCehF335/ l1oQdzp34HETjmW/Ty61K/zgtT3iRv7p5T+nIkCbuOVnrbpvIbCI3/AMqIgZIsPA8qJy TgLwrH+QH7zyuJ3p9Ff2Ju7dL670ZIQGGEm3IqhH6Chm+bJOJgPL62+THQAmHYqGIaxh umeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p91si15874329plb.165.2019.05.26.10.23.02; Sun, 26 May 2019 10:23:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727978AbfEZRUm (ORCPT + 99 others); Sun, 26 May 2019 13:20:42 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:53467 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727926AbfEZRUm (ORCPT ); Sun, 26 May 2019 13:20:42 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id E829280404; Sun, 26 May 2019 19:20:29 +0200 (CEST) Date: Sun, 26 May 2019 19:20:02 +0200 From: Pavel Machek To: Hugh Dickins Cc: Jacek Anaszewski , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Revert "leds: avoid races with workqueue"? Message-ID: <20190526172002.GB1282@xo-6d-61-c0.localdomain> References: <20190525093759.GA17767@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 2019-05-25 10:32:31, Hugh Dickins wrote: > On Sat, 25 May 2019, Pavel Machek wrote: > > > Hi! > > > > > I'm having to revert 0db37915d912 ("leds: avoid races with workqueue") > > > from my 5.2-rc testing tree, because lockdep and other debug options > > > don't like it: net/mac80211/led.c arranges for led_blink_setup() to be > > > called at softirq time, and flush_work() is not good for calling > > > then. > > > > This should keep X60 working (as well as it is now; X60 will still > > have problems with lost events in setup like yours). > > > > Can you test this instead of the revert? > > Thanks, Pavel: yes, that works fine for me on the T420s, no debug > complaints, good and silent; and the wifi LED is blinking as before. I'd like to prevent recurrence of similar problem, and I wonder if you can give me a hint. I can annotate code that can sleep with might_sleep(). How can I annotate code that can not sleep? I might do spin_lock(&dummy); this_should_not_sleep(); spin_unlock(&dummy); But I don't really need extra serialization. I just want annotations for lockdep. Any ideas? Pavel