Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Sep 2013 22:28:17 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        FreeBSD hackers Mail List <freebsd-hackers@freebsd.org>
Subject:   Re: Page fault from linux_proc_exit()
Message-ID:  <20130917202817.GA25519@dft-labs.eu>
In-Reply-To: <20130917201403.GA24318@vagner-wrk.bsdway.ru>
References:  <20130917201403.GA24318@vagner-wrk.bsdway.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130917202817.GA25519>