Re: [PATCH 7/10 v2] Generic Watchdog Timer Driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alejandro,

>>   static int watchdog_stop(struct watchdog_device *wddev)
>>   {
>> -	int err;
>> +	int err = -1;
>> +
>> +	if (test_bit(WDOG_NO_WAY_OUT,&wdd->status))
>> +		return err;
>>
>
> If you return err at this point you never clean the bit WDOG_ACTIVE then  
> the timer will keep resetting the wdt because the bit is still active.

If WDOG_ACTIVE is never cleared, then you will need to keep pinging the watchdog
to not start the reboot. Even when you use the timer (with this code):
        if (time_before(jiffies, next_heartbeat) ||
           (!test_bit(WDOG_ACTIVE, &wdt_dev.status))) {

if WDOG_ACTIVE is set then you fall down to: if (time_before(jiffies, next_heartbeat))
which means that as long that the next_heartbeat time is not there we will keep pinging
the watchdog device, but as soon as jiffies > next_heartbeat, the watchdog device will
not be triggered anymore.

But I see another possible problem here. Will do some special tests first.

Kind regards,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux