[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/52056: mount -u / causes a kernel assertion
The following reply was made to PR kern/52056; it has been noted by GNATS.
From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
Subject: Re: kern/52056: mount -u / causes a kernel assertion
Date: Fri, 10 Mar 2017 10:31:52 +0100
> On 9 Mar 2017, at 23:35, Jarom=C3=ADr Dole=C4=8Dek =
> The following reply was made to PR kern/52056; it has been noted by =
> From: =3D?UTF-8?B?SmFyb23DrXIgRG9sZcSNZWs=3D?=3D =
> To: gnats-bugs%netbsd.org@localhost
> Subject: Re: kern/52056: mount -u / causes a kernel assertion
> Date: Thu, 9 Mar 2017 23:30:52 +0100
> I've looked on the code, and basically this assertion means that there
> was a bdwrite() done with same buf before MNT_LOG was enabled, and no
> bwrite() happened between that bdwrite() and the bdwrite() triggering
> the assertion.
> wapbl_add_buf() is invoked in bdwrite(), before the BO_DELWRI flag is
> set. It adds the buffer to internal WAPBL list, then sets the B_LOCKED
> The assertion fires only when buf still doesn't have B_LOCKED set, but
> already has BO_DELWRI set. This flow should be impossible.
This is more than possible. Martin does:
-> mount -u / "Change root from read-only,no-log to no-log"
-> edit file "This will bdwrite() and leave buffers B_DELWRI"
-> exit singleuser
-> /etc/rc.d/root "Change root from no-log to log"
We now have buffers marked BO_DELWRI without B_LOCKED.
This has nothing to do with my recent changes.
We have to either:
- Remove the assertion and have wapbl_add_buf() pick up these buffers.
- Deny no-log to log transitions while read-write.
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
Main Index |
Thread Index |