Re: sched: exporting linux-rt migrate_disable for ZFS
From: Mike Galbraith
Date: Mon Dec 14 2020 - 22:22:47 EST
On Mon, 2020-12-14 at 13:33 +0100, Sebastian Andrzej Siewior wrote:
> On 2020-12-08 23:58:27 [+0000], Orivej Desh wrote:
> > Greetings!
> Hi,
>
> > With sched-Add-migrate_disable.patch first released in v5.9-rc8-rt14 [1]
> > linux-rt defines functions migrate_disable and migrate_enable.
> > They are used in linux headers in various macros and static inline
> > functions, and in particular in kmap_atomic and kunmap_atomic.
> > The latter are needed by ZFS which currently fails to build against
> > 5.9-rt [2] because these functions are exported with EXPORT_SYMBOL_GPL.
> > Could you export them with EXPORT_SYMBOL instead?
>
> This is out of my jurisdiction, so just a few notes:
> - v5.9 is out of maintenance. Be careful.
> - We don't export symbols for out-of-tree modules.
Hm, dejavu all over again. I recall this issue long ago having been
resolved in favor of exporting via plain EXPORT_SYMBOL.
https://lore.kernel.org/linux-rt-users/1321359802.4181.1.camel@frodo/
From 859a31c5ec958326dd046f4e41f6fa0db0ce98c3 Mon Sep 17 00:00:00 2001
From: Steven Rostedt <srostedt@xxxxxxxxxx>
Date: Mon, 16 Apr 2012 21:51:54 -0400
Subject: rt: Make migrate_disable/enable() and __rt_mutex_init non-GPL only
Modules that load on the normal vanilla kernel should also load on
an -rt kernel as well. This does not mean we condone non-GPL modules,
we are only being consistent.
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/rtmutex.c | 2 +-
kernel/sched.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index a02fbd9f9583..d58db993f5cd 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -1282,7 +1282,7 @@ void __rt_mutex_init(struct rt_mutex *lock, const char *name)
debug_rt_mutex_init(lock, name);
}
-EXPORT_SYMBOL_GPL(__rt_mutex_init);
+EXPORT_SYMBOL(__rt_mutex_init);
/**
* rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a
diff --git a/kernel/sched.c b/kernel/sched.c
index df3048139d1b..ed3433573641 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4255,7 +4255,7 @@ void migrate_disable(void)
p->migrate_disable = 1;
preempt_enable();
}
-EXPORT_SYMBOL_GPL(migrate_disable);
+EXPORT_SYMBOL(migrate_disable);
void migrate_enable(void)
{
@@ -4307,7 +4307,7 @@ void migrate_enable(void)
unpin_current_cpu();
preempt_enable();
}
-EXPORT_SYMBOL_GPL(migrate_enable);
+EXPORT_SYMBOL(migrate_enable);
#else
static inline void update_migrate_disable(struct task_struct *p) { }
#define migrate_disabled_updated(p) 0
--
2.29.2