Page MenuHomeFreeBSD

linuxkpi: Don't destroy the mutex in `xa_destroy()`
ClosedPublic

Authored by dumbbell on Jan 31 2025, 2:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 4, 7:54 PM
Unknown Object (File)
Mon, Mar 3, 10:09 PM
Unknown Object (File)
Mon, Feb 24, 2:30 PM
Unknown Object (File)
Thu, Feb 20, 9:52 AM
Unknown Object (File)
Tue, Feb 18, 5:06 PM
Unknown Object (File)
Sat, Feb 15, 7:48 PM
Unknown Object (File)
Sat, Feb 15, 7:44 PM
Unknown Object (File)
Fri, Feb 14, 2:13 PM
Subscribers

Details

Summary

Why

The mutex initialized in xa_init_flags() is not destroyed here on purpose. The reason is that on Linux, the xarray remains usable after a call to xa_destroy(). For instance the i915 DRM driver relies on that during the initialixation of its GuC. Basically, xa_destroy() "resets" the structure to zero but doesn't really destroy it.

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

Sponsored by: The FreeBSD Foundation

Diff Detail

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