commit f70422bffbc8fe3b183601f84a143e8b2d9591a1
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Mon Nov 23 10:56:24 2020 +0000
Add patch to reduce kmalloc limit
nvidia-kmod.spec | 8 +++++++-
reduce-kmalloc-limit-455.38.patch | 14 ++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 18ab4fe..94451d0 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -12,12 +12,14 @@ Name: nvidia-kmod
Epoch: 3
Version: 455.45.01
# Taken over by kmodtool
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: NVIDIA display driver kernel module
License: Redistributable, no modification permitted
URL:
http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
+#
https://forums.developer.nvidia.com/t/455-23-04-page-allocation-failure-i...
+Patch0: reduce-kmalloc-limit-455.38.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: x86_64
@@ -41,6 +43,7 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
--filterf
%setup -T -c
tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
# patch loop
+%patch0 -p0
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -75,6 +78,9 @@ done
%changelog
+* Mon Nov 23 2020 Leigh Scott <leigh123linux(a)gmail.com> - 3:455.45.01-3
+- Add patch to reduce kmalloc limit
+
* Mon Nov 23 2020 Nicolas Chauvet <kwizart(a)gmail.com> - 3:455.45.01-2
- Allow to disable the build of nvidia_{modeset,uvm}
diff --git a/reduce-kmalloc-limit-455.38.patch b/reduce-kmalloc-limit-455.38.patch
new file mode 100644
index 0000000..e6ac51a
--- /dev/null
+++ b/reduce-kmalloc-limit-455.38.patch
@@ -0,0 +1,14 @@
+diff -Naur kernel.orig/nvidia-modeset/nvidia-modeset-linux.c
kernel/nvidia-modeset/nvidia-modeset-linux.c
+--- kernel.orig/nvidia-modeset/nvidia-modeset-linux.c 2020-10-21 23:17:41.000000000
-0700
++++ kernel/nvidia-modeset/nvidia-modeset-linux.c 2020-11-04 10:35:44.113986369 -0800
+@@ -282,8 +282,8 @@
+ * are called while nvkms_lock is held.
+ *************************************************************************/
+
+-/* Don't use kmalloc for allocations larger than 128k */
+-#define KMALLOC_LIMIT (128 * 1024)
++/* Don't use kmalloc for allocations larger than one page */
++#define KMALLOC_LIMIT PAGE_SIZE
+
+ void* NVKMS_API_CALL nvkms_alloc(size_t size, NvBool zero)
+ {