Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752497AbdIXONm (ORCPT ); Sun, 24 Sep 2017 10:13:42 -0400 Received: from s3.sipsolutions.net ([5.9.151.49]:52124 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751263AbdIXONl (ORCPT ); Sun, 24 Sep 2017 10:13:41 -0400 Message-ID: <1506262418.2909.1.camel@sipsolutions.net> Subject: Re: [RESEND] Re: usb/net/p54: trying to register non-static key in p54_unregister_leds From: Johannes Berg To: Christian Lamparter , Andrey Konovalov Cc: Kalle Valo , linux-wireless@vger.kernel.org, netdev , LKML , Dmitry Vyukov , Kostya Serebryany , syzkaller , Stephen Boyd , Tejun Heo , Yong Zhang Date: Sun, 24 Sep 2017 16:13:38 +0200 In-Reply-To: <2589427.Vd4nrgaY4N@debian64> (sfid-20170923_213736_879752_15E98466) References: <1505937307.3026.20.camel@sipsolutions.net> <2589427.Vd4nrgaY4N@debian64> (sfid-20170923_213736_879752_15E98466) Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 852 Lines: 19 On Sat, 2017-09-23 at 21:37 +0200, Christian Lamparter wrote: > But this also begs the question: Is this really working then? > From what I can tell, if CONFIG_LOCKDEP is not set then there's no > BUG no WARN, no other splat or any other odd system behaviour. Does > [cancel | flush]_[delayed_]work[_sync] really "just work" by > *accident*, as long the delayed_work | work_struct is zeroed out?  It looks like it does, but I'm not sure it's not more or less by accident. Look at get_work_pool() for example, it might actually return non-NULL in this case, and then in start_flush_work() you'll probably fall into one of the few "already_gone" cases. > And should it work in the future as well? I guess it's not really guaranteed, the API doesn't state anything to that effect. Not that I'm looking forward to a new workqueue rewrite ;) johannes