Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Index: net-2.6.20/include/net/genetlink.h
===================================================================
--- net-2.6.20.orig/include/net/genetlink.h     2006-11-14 11:52:29.000000000 
+0100
+++ net-2.6.20/include/net/genetlink.h  2006-11-14 12:23:56.000000000 +0100
@@ -187,4 +187,15 @@
        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 */
Index: net-2.6.20/kernel/taskstats.c
===================================================================
--- net-2.6.20.orig/kernel/taskstats.c  2006-11-14 11:53:44.000000000 +0100
+++ net-2.6.20/kernel/taskstats.c       2006-11-14 12:23:18.000000000 +0100
@@ -77,7 +77,7 @@
        /*
         * 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;
 

--

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to