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 E23C6C433F5 for ; Wed, 24 Nov 2021 06:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237172AbhKXGmJ (ORCPT ); Wed, 24 Nov 2021 01:42:09 -0500 Received: from pi.codeconstruct.com.au ([203.29.241.158]:56228 "EHLO codeconstruct.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230323AbhKXGmJ (ORCPT ); Wed, 24 Nov 2021 01:42:09 -0500 Received: from pecola.lan (unknown [159.196.93.152]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id BB74320181; Wed, 24 Nov 2021 14:38:57 +0800 (AWST) Message-ID: Subject: Re: [PATCH net-next 1/3] mctp: serial: cancel tx work on ldisc close From: Jeremy Kerr To: Jiri Slaby , netdev@vger.kernel.org Cc: Greg Kroah-Hartman , Matt Johnston , "David S. Miller" , Jakub Kicinski Date: Wed, 24 Nov 2021 14:38:57 +0800 In-Reply-To: References: <20211123125042.2564114-1-jk@codeconstruct.com.au> <20211123125042.2564114-2-jk@codeconstruct.com.au> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.0-2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Jiri, > > +       cancel_work_sync(&dev->tx_work); > > But the work still can be queued after the cancel (and before the > unregister), right? Yes. Yes it can. I should be cancelling after the unregister, not before, so this'll need a v2. On the ldisc side: is there any case where we'd get a write wakeup during (or after) the ->close()? Cheers, Jeremy