HomeFreeBSD

busdma: Protect ARM busdma bounce page counters using the bounce page lock.

Description

busdma: Protect ARM busdma bounce page counters using the bounce page lock.

In bus_dmamap_unload() on ARM, the counters for free_bpages and reserved_bpages
appear to be vulnerable to unprotected read-modify-write operations that result
in accounting that looks like a page leak.

This was noticed on a 2GB quad core i.MX6 system that has more than one device
attached via FTDI based USB serial connection.

Submitted by: John Hein <jcfyecrayz@liamekaens.com>
Differential Revision: https://reviews.freebsd.org/D35553
PR: 264836
Sponsored by: NVIDIA Networking

(cherry picked from commit 6c4b6f55f77d8d7cee1b277bd6579a77d6890ef9)

Details

Provenance
hselaskyAuthored on Jun 23 2022, 9:31 AM
Differential Revision
D35553: protect arm busdma bounce page counters with bounce page lock
Parents
rG76ed54dda74f: aio_aqueue(): avoid ucred leak on failure path
Branches
Unknown
Tags
Unknown