-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error on cpus_allowed/cpus_mask with kernel 4.18.0-240.1.1 #40
Comments
As a work around, I have added below code. #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) |
tzafrir-mellanox
pushed a commit
to tzafrir-mellanox/xpmem
that referenced
this issue
Sep 11, 2024
LIB: Don't create xpmem segments twice
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Building xpmem failed with below error using kernel 4.18.0-240.1.1 on CentOS 8.3.
kernel/xpmem_pfn.c:255:25: error: 'struct task_struct' has no member named 'cpus_allowed'; did you mean 'nr_cpus_allowed'?
saved_mask = current->cpus_allowed;
^~~~~~~~~~~~
Below if statement in kernel/xpmem_pfn.c was checking for kernel version for 5.3.0-x or newer to use cpus_mask.
However, kernel 4.18.0-240.1.1 on CentOS 8.3 introduced "RH_KABI_RENAME(cpumask_t cpus_allowed, cpumask_t cpus_mask);" in /usr/src/kernels/4.18.0-240.1.1.el8_3.x86_64/include/linux/sched.h and cpus_mask had to be used instead of cpus_allowed.
Thus it failed to compile.
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
saved_mask = current->cpus_mask;
#else
saved_mask = current->cpus_allowed;
#endif
The text was updated successfully, but these errors were encountered: