Re: panic after ifioctl/if_clone_destroy

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Mon, 6 Aug 2018 11:39:04 +0200
Hi Matthew,

On 08/06/18 10:02, Hans Petter Selasky wrote:
> -		if ((tdwait = TAILQ_FIRST(&record->er_tdlist)) != NULL &&
> -		    TD_IS_RUNNING(tdwait->et_td)) {

At least the TD_IS_RUNNING() check is invalid. The "tdwait" structure is 
in the control of the other CPU and "tdwait->et_td" might be invalid at 
any time, so accessing any members here is not a good idea.

It is pretty clear that the epoch was exited during the loop:

         etd->et_td = (void*)0xDEADBEEF;

fault virtual address   = 0xdeadc2ff
fault code              = supervisor read data, page not present


If you remove the TD_IS_RUNNING() check I'm not sure how useful this 
loop will be ...

--HPS
Received on Mon Aug 06 2018 - 07:39:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC