Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965290AbbLWAdW (ORCPT ); Tue, 22 Dec 2015 19:33:22 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:60235 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932320AbbLWAcy (ORCPT ); Tue, 22 Dec 2015 19:32:54 -0500 Subject: Re: [PATCH 2/5] watchdog: Separate and maintain variables based on variable lifetime To: Tomas Winkler References: <1450645503-16661-1-git-send-email-linux@roeck-us.net> <1450645503-16661-3-git-send-email-linux@roeck-us.net> <20151221172815.GC12696@localhost> <5678AA13.8040708@roeck-us.net> Cc: Hans de Goede , Wim Van Sebroeck , "linux-kernel@vger.kernel.org" , Linux Watchdog Mailing List , Damien Riegel , Pratyush Anand From: Guenter Roeck Message-ID: <5679EBB3.2000707@roeck-us.net> Date: Tue, 22 Dec 2015 16:32:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@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: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@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 Content-Length: 690 Lines: 22 On 12/22/2015 02:05 PM, Tomas Winkler wrote: > > > Do you see a situation where holding the lock between calls into the driver > > might be a problem ? > > I don't think u are holding the lock now in watchdog_unregister when WDOG_UNREGISTERED was dropped. the lock is held while clearing the pointers: mutex_lock(&wd_data->lock); wd_data->wdd = NULL; wdd->wd_data = NULL; mutex_unlock(&wd_data->lock); Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/