HomeFreeBSD

Fix some races introduced in r332974.

Description

Fix some races introduced in r332974.

With r332974, when performing a synchronized access of a page's "queue"
field, one must first check whether the page is logically dequeued. If
so, then the page lock does not prevent the page from being removed
from its page queue. Intoduce vm_page_queue(), which returns the page's
logical queue index. In some cases, direct access to the "queue" field
is still required, but such accesses should be confined to sys/vm.

Reported and tested by: pho
Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15280

Details

Provenance
markjAuthored on
Reviewer
kib
Differential Revision
D15280: Fix racy checks of m->queue.
Parents
rS333255: Make reading imx6 gpio pins work correctly whether the pin is in open-drain
Branches
Unknown
Tags
Unknown