HomeFreeBSD

linuxkpi: Fix `atomic_long_sub()` overflow

Description

linuxkpi: Fix atomic_long_sub() overflow

By (ab)using atomic_long_add_return(), atomic_long_sub() was making
the atomic long overflow. Indeed the underlying FreeBSD atomic is based
on an unsigned long.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38090

(cherry picked from commit 9491ea7c68221ca7bc5e369ebb57660886ef1b13)

Details

Provenance
dumbbellAuthored on Jan 15 2023, 2:56 PM
Reviewer
manu
Differential Revision
D38090: linuxkpi: Fix `atomic_long_sub()` overflow
Parents
rGcc32cc0f8e96: linuxkpi: Add `io_mapping_map_user()` and `remap_pfn_range()`
Branches
Unknown
Tags
Unknown