]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.fixes/taskstats-alignment
Move xen patchset to new version's subdir.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / taskstats-alignment
diff --git a/src/patches/suse-2.6.27.31/patches.fixes/taskstats-alignment b/src/patches/suse-2.6.27.31/patches.fixes/taskstats-alignment
new file mode 100644 (file)
index 0000000..cee76a1
--- /dev/null
@@ -0,0 +1,52 @@
+From: Raymund Will <rw@suse.de>
+Subject: ia64: fill 'struct taskstats' on stack and 'memcpy' result to skb.
+References: bnc#448410
+
+
+Signed-off-by: Raymund Will <rw@suse.de>
+
+---
+ kernel/taskstats.c           |   13 +++++++++++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+--- a/kernel/taskstats.c
++++ b/kernel/taskstats.c
+@@ -433,6 +433,12 @@ static int taskstats_user_cmd(struct sk_
+       struct taskstats *stats;
+       size_t size;
+       cpumask_t mask;
++#ifdef CONFIG_IA64
++      struct taskstats statn;
++#define statf &statn
++#else
++#define statf stats
++#endif
+       rc = parse(info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK], &mask);
+       if (rc < 0)
+@@ -463,7 +469,7 @@ static int taskstats_user_cmd(struct sk_
+               if (!stats)
+                       goto err;
+-              rc = fill_pid(pid, NULL, stats);
++              rc = fill_pid(pid, NULL, statf);
+               if (rc < 0)
+                       goto err;
+       } else if (info->attrs[TASKSTATS_CMD_ATTR_TGID]) {
+@@ -472,12 +478,15 @@ static int taskstats_user_cmd(struct sk_
+               if (!stats)
+                       goto err;
+-              rc = fill_tgid(tgid, NULL, stats);
++              rc = fill_tgid(tgid, NULL, statf);
+               if (rc < 0)
+                       goto err;
+       } else
+               goto err;
++#ifdef CONFIG_IA64
++      memcpy(stats, &statn, sizeof(statn));
++#endif
+       return send_reply(rep_skb, info->snd_pid);
+ err:
+       nlmsg_free(rep_skb);