pids: Avoid ABI change in 4.12.9

This commit is contained in:
Ben Hutchings 2017-08-31 01:28:44 +01:00
parent fe31ec4f4a
commit c755b1fcfd
3 changed files with 57 additions and 0 deletions

1
debian/changelog vendored
View File

@ -211,6 +211,7 @@ linux (4.12.10-1) UNRELEASED; urgency=medium
* cpupower: Add/update definition of MSRHEADER macro for turbostat and
x86_energy_perf_policy (Closes: #872414)
* Ignore ABI changes in nand and perf_event subsystems
* pids: Avoid ABI change in 4.12.9
[ Roger Shimizu ]
* [armel] Disable CONFIG_STRICT_KERNEL_RWX, which will save about 3MB

View File

@ -0,0 +1,55 @@
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)
{

View File

@ -129,6 +129,7 @@ bugfix/alpha/alpha-restore-symbol-versions-for-symbols-exported-f.patch
bugfix/all/module-disable-matching-missing-version-crc.patch
# ABI maintenance
debian/pids-avoid-abi-change-in-4.12.9.patch
# Tools bug fixes
bugfix/all/usbip-document-tcp-wrappers.patch