56 lines
1.4 KiB
Diff
56 lines
1.4 KiB
Diff
From: Ben Hutchings <ben@decadent.org.uk>
|
|
Date: Thu, 31 Aug 2017 01:26:42 +0100
|
|
Subject: pids: Avoid ABI change in 4.12.9
|
|
Forwarded: not-needed
|
|
|
|
Commit dd1c1f2f2028 "pids: make task_tgid_nr_ns() safe" changed
|
|
task_tgid_nr_ns() from an exported extern function to a static inline.
|
|
Change it back.
|
|
|
|
---
|
|
--- a/include/linux/pid.h
|
|
+++ b/include/linux/pid.h
|
|
@@ -8,9 +8,12 @@ enum pid_type
|
|
PIDTYPE_PID,
|
|
PIDTYPE_PGID,
|
|
PIDTYPE_SID,
|
|
- PIDTYPE_MAX,
|
|
+ PIDTYPE_MAX
|
|
+#ifndef __GENKSYMS__
|
|
+ ,
|
|
/* only valid to __task_pid_nr_ns() */
|
|
__PIDTYPE_TGID
|
|
+#endif
|
|
};
|
|
|
|
/*
|
|
--- a/kernel/pid.c
|
|
+++ b/kernel/pid.c
|
|
@@ -540,6 +540,12 @@ pid_t __task_pid_nr_ns(struct task_struc
|
|
}
|
|
EXPORT_SYMBOL(__task_pid_nr_ns);
|
|
|
|
+pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
|
|
+{
|
|
+ return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, ns);
|
|
+}
|
|
+EXPORT_SYMBOL(task_tgid_nr_ns);
|
|
+
|
|
struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
|
|
{
|
|
return ns_of_pid(task_pid(tsk));
|
|
--- a/include/linux/sched.h
|
|
+++ b/include/linux/sched.h
|
|
@@ -1168,10 +1168,7 @@ static inline pid_t task_session_vnr(str
|
|
return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL);
|
|
}
|
|
|
|
-static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
|
|
-{
|
|
- return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, ns);
|
|
-}
|
|
+extern pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns);
|
|
|
|
static inline pid_t task_tgid_vnr(struct task_struct *tsk)
|
|
{
|