Page fault from linux_proc_exit()

Mateusz Guzik mjguzik at gmail.com
Tue Sep 17 20:28:25 UTC 2013


On Wed, Sep 18, 2013 at 12:14:04AM +0400, Vagner wrote:
> Hi!
> I ran skype and perhaps, it was *destroyed* (may be it was fault of skype
> , I don't know). After I have got system panic. I looked to coredump:
> - I got fault in frame #7 where: if ((q->p_flag & P_WEXIT) == 0 &&
>   em->pdeath_signal != 0). But struct linux_emuldata *em == NULL. 
> 
> # from kgdb:
> # p em
> # $1 = (struct linux_emuldata *) 0x0
> 
> - I saw what `em = em_find(q, EMUL_DOLOCK);' from upper line of code
>   and from function em_find() that `em' could be equal NULL.
> 
> Perhaps, are we need to add check after line call em_find in function
> linux_proc_exit() - `continue;`?
> 

In general this is a race condition and linux_proc_exit is not the only
place where this is a problem.

see http://people.freebsd.org/~mjg/patches/linux-emuldata-race-hack.diff

Maybe I'll get around to commit this during the weekend, I am happy to
let someone else work on this though.

-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the freebsd-hackers mailing list