Skip to content

Commit

Permalink
6.7/6.8: misc-additions: Add ptr1337's GPL condom for Nvidia modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Tk-Glitch committed Feb 1, 2024
1 parent ff6599d commit 07d4c29
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
37 changes: 37 additions & 0 deletions linux-tkg-patches/6.7/0012-misc-additions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,40 @@ index f4b210ab061291..837d0dbb28ea08 100644
depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
help
This value can be used to select the number of bits to use to

From 44154371304cc8d068dd33c5dec4057926c364af Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Mon, 22 Jan 2024 18:26:56 +0100
Subject: [PATCH] Workaround to fix issues when compiling the nvidia driver

Signed-off-by: Peter Jung <admin@ptr1337.dev>
---
kernel/rcu/tree_plugin.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index cc130b57542a..1d85cb7071cb 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 41021080ad25..72474d8ec180 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -406,7 +406,7 @@ void __rcu_read_lock(void)
WRITE_ONCE(current->rcu_read_unlock_special.b.need_qs, true);
barrier(); /* critical section after entry code. */
}
-EXPORT_SYMBOL_GPL(__rcu_read_lock);
+EXPORT_SYMBOL(__rcu_read_lock);

/*
* Preemptible RCU implementation for rcu_read_unlock().
@@ -431,7 +431,7 @@ void __rcu_read_unlock(void)
WARN_ON_ONCE(rrln < 0 || rrln > RCU_NEST_PMAX);
}
}
-EXPORT_SYMBOL_GPL(__rcu_read_unlock);
+EXPORT_SYMBOL(__rcu_read_unlock);

/*
* Advance a ->blkd_tasks-list pointer to the next entry, instead
32 changes: 32 additions & 0 deletions linux-tkg-patches/6.8/0012-misc-additions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,35 @@ index f4b210ab061291..837d0dbb28ea08 100644
help
This value can be used to select the number of bits to use to

From 44154371304cc8d068dd33c5dec4057926c364af Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Mon, 22 Jan 2024 18:26:56 +0100
Subject: [PATCH] Workaround to fix issues when compiling the nvidia driver

Signed-off-by: Peter Jung <admin@ptr1337.dev>
---
kernel/rcu/tree_plugin.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 41021080ad25..72474d8ec180 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -406,7 +406,7 @@ void __rcu_read_lock(void)
WRITE_ONCE(current->rcu_read_unlock_special.b.need_qs, true);
barrier(); /* critical section after entry code. */
}
-EXPORT_SYMBOL_GPL(__rcu_read_lock);
+EXPORT_SYMBOL(__rcu_read_lock);

/*
* Preemptible RCU implementation for rcu_read_unlock().
@@ -431,7 +431,7 @@ void __rcu_read_unlock(void)
WARN_ON_ONCE(rrln < 0 || rrln > RCU_NEST_PMAX);
}
}
-EXPORT_SYMBOL_GPL(__rcu_read_unlock);
+EXPORT_SYMBOL(__rcu_read_unlock);

/*
* Advance a ->blkd_tasks-list pointer to the next entry, instead

1 comment on commit 07d4c29

@jeisom
Copy link

@jeisom jeisom commented on 07d4c29 Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably applied to linux 6.6 as well as the change was backported into 6.6.15.

Please sign in to comment.