Commit 0ae64684 authored by Balbir Singh's avatar Balbir Singh Committed by Linus Torvalds
Browse files

[PATCH] Fix taskstats size calculation (use the new genetlink utility functions)

The addition of the CSA patch pushed the size of struct taskstats to 256
bytes.  This exposed a problem with prepare_reply(), we were not allocating
space for the netlink and genetlink header.  It worked earlier because
alloc_skb() would align the skb to SMP_CACHE_BYTES, which added some additonal
Signed-off-by: default avatarBalbir Singh <>
Cc: Jamal Hadi <>
Cc: Shailabh Nagar <>
Cc: Thomas Graf <>
Cc: "David S. Miller" <>
Cc: Jay Lan <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 17db952c
......@@ -75,7 +75,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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment