Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41663
b: refs/heads/master
c: 3dabc71
h: refs/heads/master
i:
  41661: 77217a1
  41659: d932616
  41655: be260e7
  41647: cf1e89f
  41631: e9cf397
  41599: 6da8a00
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Dec 3, 2006
1 parent 8ed1ad1 commit dec3852
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfb6eeb4c860592edd123fdea908d23c6ad1c7dc
refs/heads/master: 3dabc7157859e706770c825aa229f8943db4e0e1
11 changes: 11 additions & 0 deletions trunk/include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,15 @@ static inline int genlmsg_total_size(int payload)
return NLMSG_ALIGN(genlmsg_msg_size(payload));
}

/**
* genlmsg_new - Allocate a new generic netlink message
* @payload: size of the message payload
* @flags: the type of memory to allocate.
*/
static inline struct sk_buff *genlmsg_new(size_t payload, gfp_t flags)
{
return nlmsg_new(genlmsg_total_size(payload), flags);
}


#endif /* __NET_GENERIC_NETLINK_H */
2 changes: 1 addition & 1 deletion trunk/kernel/taskstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,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(genlmsg_total_size(size), GFP_KERNEL);
skb = genlmsg_new(size, GFP_KERNEL);
if (!skb)
return -ENOMEM;

Expand Down

0 comments on commit dec3852

Please sign in to comment.