Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3060075ybi; Sun, 26 May 2019 13:38:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5OTyrUleASmhmkcXhKa4rB66J43pbA3ZWV2SjaS0voSaX62Uaf2tUjIXOj6NZTG4Ov6DX X-Received: by 2002:a65:6648:: with SMTP id z8mr72631924pgv.303.1558903121315; Sun, 26 May 2019 13:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558903121; cv=none; d=google.com; s=arc-20160816; b=pKEISQfqVezYZSeAEvfZ8xw/p4wsoBcjiIOJuqKM8q8dpghXsbQ5XVnzSIQ7U2btdX qB5BXZwQb8/G7NNCgaCNcjPixEAPeGUg9MHnh3z0Npe5gcejLUNvz6qUmiui7SanqCac TkebMweDzy2nW1+LvNJ6pDbA3ma1/38A8i8RLolRo6xhrgy8VrO88TQ2CoSm7zTBKP7T dR9CBCqF3n/fEz/xN4L6TSSB4rLQfMPTM6+lLN9WwKLIP6IscE1vVhrfz2kKqjc2EZPX Y22sjgmOssmvZVaF+G27fN556cZzJ2xuxYd8YoEl1yGInYlP3/szD7UOsRC3hRLwV7Zk pyFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=rvY1bULnaeo7Db8jSakyFk+Wm8YWMrv8FmOFXZGqPcQ=; b=PmMj0X4ri1gdCT+EUg6fqWkEYtBZNX2UhDfB9dhYZCS7/GqrtmEmVBTCGZTiYnps0P IwU2n5ql264akOBPdLtaYVKKB2i7CuNH9n3hcyTzspBF69BoGe63lPo4Nm8JgyBLA2rV 4eSVZG2/gbcm69XyuXuZUQlo0VEc0TDRjMHCPMcnT3OMqjK4fPtyJBMakuEZv28sx7Ua X6DtUCGmiNhMjxCAlk1kslXVfafKnU54rvVTW3iZJQe//exTI5PtB3oOWQz/VcAzVxjW tWwie+QAfYWiq+2EmVPL7WXuwj+JHGSqDQX72jP4E+ZnYLWSTUYeq6UjVf4/s4wnEMw5 PeRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vGIri8Xf; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si7115463plr.313.2019.05.26.13.38.25; Sun, 26 May 2019 13:38:41 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=vGIri8Xf; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725883AbfEZUgQ (ORCPT + 99 others); Sun, 26 May 2019 16:36:16 -0400 Received: from mail-ot1-f47.google.com ([209.85.210.47]:39819 "EHLO mail-ot1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbfEZUgQ (ORCPT ); Sun, 26 May 2019 16:36:16 -0400 Received: by mail-ot1-f47.google.com with SMTP id r7so13111048otn.6 for ; Sun, 26 May 2019 13:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=rvY1bULnaeo7Db8jSakyFk+Wm8YWMrv8FmOFXZGqPcQ=; b=vGIri8Xftkl1yf3/Zu4MbsdPt65qozukjAtSRtQSsF/n55A+AoevHVJpMrc4jtKos1 f4YDeXA9PYad2hbWrJmNhq8tOv/tQnSEQOxHYswni+ZT5lQryZutu9wn34muMOlSlHYu 8LO+HX7L0MJiGyAOGhigm/TX6hSleTuzvQwUSY9KmNFbDOMCJV3cFopUPq6q/1qUR65S uXMcO4WpXXuOjDc4QhdHVwLj2w0LH7Ecw41TP123cgGRbaQW1UdpmW2KO+wxTpoqM1j/ 8H4SN7XKlDugwt5wYd0iRmj2tkyTAOTt7QW1PsISc4fBrYG66DwrqKanpcmdUGLJFwG+ ubKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=rvY1bULnaeo7Db8jSakyFk+Wm8YWMrv8FmOFXZGqPcQ=; b=VgxvYpBsGdZvqCScR1DQ7M5jj7A2LY3VatzpKl9CbP7FlmE8VR/1gkpCDbKjqujkxY xZSXeXQgF1h5GSqcvf5BoG4bPtBFKR02SljyTTz14eOyXQHUWKHBv4v/YuYH8wrapsyk WvubCv9/DoDZXKELJ8uDrajBlHbEVzETEbPkhjWvy692OZdtY4RwKQXYd9cbDVbS/Dwb 6Wm9FhKjFAc4qIPkPxmXchSuFoyU6RkoIGoMa3IGGn0AyAr+bRhHZhsnzhvXD1geiaFf 5eVOf2sgKZplyxcQykahcjH2cbDwbqJhzHXsMcWxsqORkpI2AsNDmFn3iGImV1dfqGZM TbOQ== X-Gm-Message-State: APjAAAW8LtUR5YefgLQY5+1PFmhydHEsIMI9/4qSaatEoJSbTZ1NSmUa q5rF8xaa3VX3/3PzyfdBwVVEtQ== X-Received: by 2002:a05:6830:11da:: with SMTP id v26mr3470395otq.137.1558902974916; Sun, 26 May 2019 13:36:14 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 33sm3454974otb.56.2019.05.26.13.36.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 May 2019 13:36:14 -0700 (PDT) Date: Sun, 26 May 2019 13:36:11 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Pavel Machek cc: Hugh Dickins , Jacek Anaszewski , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Revert "leds: avoid races with workqueue"? In-Reply-To: <20190526172002.GB1282@xo-6d-61-c0.localdomain> Message-ID: References: <20190525093759.GA17767@amd> <20190526172002.GB1282@xo-6d-61-c0.localdomain> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 26 May 2019, Pavel Machek wrote: > On Sat 2019-05-25 10:32:31, Hugh Dickins wrote: > > > > 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? I haven't tried to do that directly, so I'm likely to give bad advice: in particular, I forget the limitations of checking in_atomic(). But very useful (and much cheaper than lockdep) debug options in this area are CONFIG_DEBUG_PREEMPT and CONFIG_DEBUG_ATOMIC_SLEEP. Hugh