]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/taskstats-alignment
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / taskstats-alignment
1 From: Raymund Will <rw@suse.de>
2 Subject: ia64: fill 'struct taskstats' on stack and 'memcpy' result to skb.
3 References: bnc#448410
4
5
6 Signed-off-by: Raymund Will <rw@suse.de>
7
8 ---
9 kernel/taskstats.c | 13 +++++++++++--
10 1 files changed, 11 insertions(+), 2 deletions(-)
11
12 --- a/kernel/taskstats.c
13 +++ b/kernel/taskstats.c
14 @@ -433,6 +433,12 @@ static int taskstats_user_cmd(struct sk_
15 struct taskstats *stats;
16 size_t size;
17 cpumask_t mask;
18 +#ifdef CONFIG_IA64
19 + struct taskstats statn;
20 +#define statf &statn
21 +#else
22 +#define statf stats
23 +#endif
24
25 rc = parse(info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK], &mask);
26 if (rc < 0)
27 @@ -463,7 +469,7 @@ static int taskstats_user_cmd(struct sk_
28 if (!stats)
29 goto err;
30
31 - rc = fill_pid(pid, NULL, stats);
32 + rc = fill_pid(pid, NULL, statf);
33 if (rc < 0)
34 goto err;
35 } else if (info->attrs[TASKSTATS_CMD_ATTR_TGID]) {
36 @@ -472,12 +478,15 @@ static int taskstats_user_cmd(struct sk_
37 if (!stats)
38 goto err;
39
40 - rc = fill_tgid(tgid, NULL, stats);
41 + rc = fill_tgid(tgid, NULL, statf);
42 if (rc < 0)
43 goto err;
44 } else
45 goto err;
46
47 +#ifdef CONFIG_IA64
48 + memcpy(stats, &statn, sizeof(statn));
49 +#endif
50 return send_reply(rep_skb, info->snd_pid);
51 err:
52 nlmsg_free(rep_skb);