Page MenuHomeFreeBSD

linuxkpi: Fix `atomic_long_sub()` overflow
ClosedPublic

Authored by dumbbell on Jan 16 2023, 7:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 4 2024, 10:09 PM
Unknown Object (File)
Oct 3 2024, 1:51 PM
Unknown Object (File)
Oct 1 2024, 4:19 PM
Unknown Object (File)
Oct 1 2024, 2:23 PM
Unknown Object (File)
Sep 28 2024, 3:52 PM
Unknown Object (File)
Sep 27 2024, 6:45 PM
Unknown Object (File)
Sep 24 2024, 4:22 AM
Unknown Object (File)
Sep 23 2024, 7:48 PM

Details

Summary

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.

This is part of the update of the DRM drivers to Linux 5.13.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable