Re: [PATCH] Remove if_watchdog use

From: Gavin Atkinson <gavin_at_freebsd.org>
Date: Tue, 10 Nov 2009 22:17:44 +0000 (GMT)
On Tue, 10 Nov 2009, John Baldwin wrote:
> On Tuesday 10 November 2009 4:45:03 pm Gavin Atkinson wrote:
>> I managed to get a panic when running wpa_supplicant:
>>
>> System call ioctl returning with the following locks held:
>> exclusive sleep mutex an0 (network driver) r=0 (0xc58fc180) locked _at_
>> /usr/src/sys/dev/an/if_an.c:2341
>> panic: witness_warn
>>
>> This seems to fix that:
>>
>> --- /usr/src/sys/dev/an/if_an.c.orig	2009-11-10 19:26:21.000000000
>> +0000
>> +++ /usr/src/sys/dev/an/if_an.c	2009-11-10 19:27:24.000000000 +0000
>> _at__at_ -2570,6 +2570,9 _at__at_
>>   			an_setdef(sc, &sc->areq);
>>   			AN_UNLOCK(sc);
>>   			break;
>> +		default:
>> +			AN_UNLOCK(sc);
>> +			break;
>>   		}
>>
>>   		/*
>
> Ok, thanks.  Sadly the ioctl handling probably needs a bit more work since it
> calls copyin() while holding the an(4) mutex, but I will leave that for
> another day.

It actually appears that the above panic is not something that has been 
introduced with your patch - I can reproduce it on a vanilla system. 
The above patch fixes it in the original code too.

Gavin
Received on Tue Nov 10 2009 - 21:17:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC