Files
Jungfraujoch/docs
leonarski_fandClaude Opus 5 59ebe8d9ae PCIe driver: guard vm_flags_set for RHEL, which backported it into 5.14
RHEL and its derivatives report LINUX_VERSION_CODE 5.14.0 for the whole of el9
while backporting newer kernel APIs into it, so the version check alone picked
the pre-6.3 branch on every el9 >= 9.5 and the module failed to build with
"assignment of read-only member 'vm_flags'". HAVE_VM_FLAGS_SET could override
it, but nothing sets it and dkms.conf does not pass it, so a build from the RPM
had no way to reach it.

vm_flags_set() and the const vm_flags member appear between kernel-5.14.0-440
and -450.el9, during the 9.5 development stream. RHEL_MINOR tracks the released
minor exactly, so RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,5) is the test:
9.0-9.4 (GA -427) do not have them, 9.5 (-503), 9.6 (-570), 9.7 (-611) and
9.8 (-655) do. el10 is 6.12-based and LINUX_VERSION_CODE already covers it, as
it does the removal of no_llseek that the other guard in this driver handles.

Spelled through a JFJOCH_RHEL_GE() helper rather than inline, because the
obvious form

  #if defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,5)

is a hard error on both gcc and clang for every non-RHEL kernel: && does not
short-circuit past a parse error, and the undefined function-like macro leaves
"0 (9,5)" behind.

Also corrects > to >= on the upstream check. The wrappers landed in 6.3, so a
vanilla 6.3.0 kernel was taking the pre-6.3 branch.

Generated code on el8 is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLMZgfMEdtPBZt1F2rNbRA
2026-08-25 17:40:44 +02:00
..
2026-08-25 13:38:29 +02:00
2026-08-25 08:21:39 +02:00
2026-08-25 08:21:39 +02:00
2026-08-25 13:38:29 +02:00
2026-08-25 08:21:39 +02:00
2026-08-13 17:03:10 +02:00
2026-08-25 08:21:39 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2025-04-14 11:52:06 +02:00
2024-11-22 21:25:20 +01:00
2026-02-18 16:17:21 +01:00
2025-06-24 16:43:47 +02:00
2024-11-17 14:55:09 +01:00
2026-08-13 17:03:10 +02:00
2024-11-17 14:55:09 +01:00
2026-08-25 08:21:39 +02:00
2026-07-19 09:39:28 +02:00
2026-08-25 08:21:39 +02:00
2026-08-13 17:03:10 +02:00
2026-08-25 08:21:39 +02:00
2026-08-13 17:03:10 +02:00
2025-11-28 12:47:35 +01:00
2026-06-23 20:29:49 +02:00
2026-07-11 07:19:11 +02:00
2024-12-02 21:17:14 +01:00
2024-12-02 21:17:14 +01:00
2026-08-13 17:03:10 +02:00
2026-08-25 08:21:39 +02:00
2026-08-13 17:03:10 +02:00
2024-11-22 21:25:20 +01:00
2026-08-25 08:21:39 +02:00
2026-08-25 08:21:39 +02:00
2026-08-25 08:21:39 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2024-11-17 14:55:09 +01:00
2024-11-22 21:25:20 +01:00