Port-atari archive

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

Re: pool panic on installer



On Wed, Dec 24, 2008 at 6:57 PM, Izumi Tsutsui 
<tsutsui%ceres.dti.ne.jp@localhost> wrote:
> (subject changed and start a new thread)
>
> In article 
> <5d8b91e0812191846u44cd5be3l7fc067e2a0c5d2c7%mail.gmail.com@localhost>
> Tuomo wrote:
>
>> I fixed atari/dev/md_root.c which had problem with DIAGNOSTIC kernel (stopped
>> at assertion: bp->b_refcnt > 0). Funny thing is that problem seems to be
>> root cause for 68030 cpu installation panics and it no longer exist with 
>> fixed
>> /atari/dev/md_root.c. I'm no longer wondering why kernel panicked only with
>> installation :)
>
> atari/dev/md_root.c uses getiobuf(9) to get buffer,
> but getiobuf(9) man page says:
>>>     Note that the allocated buffer doesn't belong to buffer cache.  To free
>>>     it, putiobuf() should be used.  brelse() should not be used on it.
> so adding brelse() is not correct fix for the initial problem.
>
> I've tried atari's md_root.c (reading md_root from floppy) on i386
> with some changes, and now it looks it's enough to clear
> bp->b_oflags (which was introduced on vmlocking2 merge)
> as per the similar function in sys/kern/subr_disk.c:
> http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/kern/subr_disk.c.diff?r1=1.89&r2=1.90
>
> Note it's also safe to clip bp->b_bcount with bytes_left
> because size of md_root might not be a multiple of the cylinder size.
> (5MB md_root on i386 causes panic later due to malloc corruption)

Thanks for the patch; I tried it with DIAGNOSTIC kernel and it works without
glitches.

-Tuomo


Home | Main Index | Thread Index | Old Index