]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
busdma: Protect ARM busdma bounce page counters using the bounce page lock.
authorHans Petter Selasky <hselasky@FreeBSD.org>
Thu, 23 Jun 2022 09:31:17 +0000 (11:31 +0200)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Tue, 28 Jun 2022 06:20:34 +0000 (08:20 +0200)
commit78088c5714e065058e8b18595d31a2c115cc00d6
tree2174a0f6abc6342d3ceb49217712be38cdf2ba4b
parentdac438a9b599cfec13b463a1a8d90283f7ed830f
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)
sys/arm/arm/busdma_machdep.c