From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753011AbcDUXah (ORCPT ); Thu, 21 Apr 2016 19:30:37 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:35061 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751571AbcDUXaf (ORCPT ); Thu, 21 Apr 2016 19:30:35 -0400 Date: Thu, 21 Apr 2016 16:30:32 -0700 From: Guenter Roeck To: One Thousand Gnomes Cc: Wim Van Sebroeck , Clemens Gruber , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] watchdog: core: Fix circular locking dependency Message-ID: <20160421233032.GA30063@roeck-us.net> References: <1461249494-24924-1-git-send-email-linux@roeck-us.net> <20160421155055.503e6d23@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160421155055.503e6d23@lxorguk.ukuu.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 21, 2016 at 03:50:55PM +0100, One Thousand Gnomes wrote: > > Turns out the call to cancel_delayed_work_sync() in watchdog_release() > > is not necessary and can be dropped. If the worker is no longer necessary, > > the subsequent call to watchdog_update_worker() will cancel it. If it is > > already running, it won't do anything, since the worker function checks > > if it needs to ping the watchdog or not. > > Is this actually true. Consider the pathalogical case of the device being > closed and the modue unloaded. In that case the close completes, we drop > the module count but could still do work on it. > Module unload is handled separately and also calls cancel_delayed_work_sync(). Guenter