X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Ftaskstats.c;h=5d6a8c54ee85f56f9a3640480d5560ed35f2b4e5;hb=9acc1853519a0473620d424105f9d49ea5b4e62e;hp=2ed4040d0dc56423fa73ec0105c226357528f18e;hpb=f7425b160db500520c33f241edb066fc5c413f03;p=linux-2.6-omap-h63xx.git diff --git a/kernel/taskstats.c b/kernel/taskstats.c index 2ed4040d0dc..5d6a8c54ee8 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c @@ -18,7 +18,9 @@ #include #include +#include #include +#include #include #include #include @@ -75,7 +77,7 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp, /* * If new attributes are added, please revisit this allocation */ - skb = nlmsg_new(size, GFP_KERNEL); + skb = nlmsg_new(genlmsg_total_size(size), GFP_KERNEL); if (!skb) return -ENOMEM; @@ -198,7 +200,13 @@ static int fill_pid(pid_t pid, struct task_struct *pidtsk, */ delayacct_add_tsk(stats, tsk); + + /* fill in basic acct fields */ stats->version = TASKSTATS_VERSION; + bacct_add_tsk(stats, tsk); + + /* fill in extended acct fields */ + xacct_add_tsk(stats, tsk); /* Define err: label here if needed */ put_task_struct(tsk);