Re: Linux 2.4.1-ac15

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 22 Feb 2001 10:29:58 +0000 (GMT)


> >We can take page faults in interrupt handlers in 2.4 so I had to use a
> >spinlock, but that sounds the same
>
> Umm? The above doesn't really make sense.
>
> We can take a page fault on the kernel region with the lazy page
> directory filling, but that code will just set the PGD entry and exit
> without taking any lock at all. So it basically ends up being an
> "invisible" event.

Its only normally invisible. Mark Hemment pointed out there is currently a
race where if both cpus go to fill in the same entry the logic goes

CPU1 CPU2

pgd present pgd present
pmd not present
load pmd
pmd present
Explode messily

The race looks right to me since both CPU's can be running from the same
mm.

The obvious fix (removing the 2nd check) of course hangs the WP check. I
have a hack [not for Linus grade] for that now but really need to walk as
far as the pte in the racey case to check for a WP fault.

> 2.4.x. In that case you would take the exception table lock, but that is
> true in both 2.2.x and in 2.4.x.

I didnt say it wasnt

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/