diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch deleted file mode 100644 index 0f18c8a3e6..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | |||
4 | From 4ba1f53c5aebb4433fedc25d65af010274985043 Mon Sep 17 00:00:00 2001 | ||
5 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
6 | Date: Thu, 21 Aug 2014 10:53:12 -0400 | ||
7 | Subject: [PATCH 2/3] Update statedump to 3.17 nsproxy locking | ||
8 | |||
9 | This Linux upstream commit introduces locking strategy back and forth: | ||
10 | |||
11 | commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 | ||
12 | Author: Eric W. Biederman <ebiederm@xmission.com> | ||
13 | Date: Mon Feb 3 19:13:49 2014 -0800 | ||
14 | |||
15 | namespaces: Use task_lock and not rcu to protect nsproxy | ||
16 | |||
17 | Use the task lock starting from kernel 3.17 rather than RCU to access | ||
18 | the task nsproxy. | ||
19 | |||
20 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
21 | --- | ||
22 | lttng-statedump-impl.c | 15 +++++++++++++++ | ||
23 | 1 file changed, 15 insertions(+) | ||
24 | |||
25 | diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c | ||
26 | index dad51ddaa250..e4caa488e436 100644 | ||
27 | --- a/lttng-statedump-impl.c | ||
28 | +++ b/lttng-statedump-impl.c | ||
29 | @@ -378,6 +378,9 @@ int lttng_list_interrupts(struct lttng_session *session) | ||
30 | } | ||
31 | #endif | ||
32 | |||
33 | +/* | ||
34 | + * Called with task lock held. | ||
35 | + */ | ||
36 | static | ||
37 | void lttng_statedump_process_ns(struct lttng_session *session, | ||
38 | struct task_struct *p, | ||
39 | @@ -389,8 +392,18 @@ void lttng_statedump_process_ns(struct lttng_session *session, | ||
40 | struct nsproxy *proxy; | ||
41 | struct pid_namespace *pid_ns; | ||
42 | |||
43 | + /* | ||
44 | + * Back and forth on locking strategy within Linux upstream for nsproxy. | ||
45 | + * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 | ||
46 | + * "namespaces: Use task_lock and not rcu to protect nsproxy" | ||
47 | + * for details. | ||
48 | + */ | ||
49 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) | ||
50 | rcu_read_lock(); | ||
51 | proxy = task_nsproxy(p); | ||
52 | +#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ | ||
53 | + proxy = p->nsproxy; | ||
54 | +#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ | ||
55 | if (proxy) { | ||
56 | pid_ns = lttng_get_proxy_pid_ns(proxy); | ||
57 | do { | ||
58 | @@ -402,7 +415,9 @@ void lttng_statedump_process_ns(struct lttng_session *session, | ||
59 | trace_lttng_statedump_process_state(session, | ||
60 | p, type, mode, submode, status, NULL); | ||
61 | } | ||
62 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) | ||
63 | rcu_read_unlock(); | ||
64 | +#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ | ||
65 | } | ||
66 | |||
67 | static | ||
68 | -- | ||
69 | 1.8.1.2 | ||
70 | |||