On 6/20/15, 9:38 AM, Nikolay Aleksandrov wrote:
<<<snip>>>diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c new file mode 100644 index 0000000..29c7802 --- /dev/null +++ b/net/core/lwtunnel.c @@ -0,0 +1,162 @@ +/* + * lwtunnel Infrastructure for light weight tunnels like mpls + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + +#include <linux/capability.h> +#include <linux/module.h> +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/slab.h> +#include <linux/uaccess.h> +#include <linux/skbuff.h> +#include <linux/netdevice.h> +#include <linux/in.h> +#include <linux/init.h> +#include <linux/err.h> + +#include <net/lwtunnel.h> +#include <net/rtnetlink.h> + +struct lwtunnel_state *lwtunnel_state_alloc(int hdr_len) +{ + struct lwtunnel_state *lws; + + return kzalloc(sizeof(*lws) + hdr_len, GFP_KERNEL);This seems to be called with rcu_read_lock so GFP_ATOMIC would have to be used. (Judging by patch 3/3’s mpls_build_state and lwtunnel_build_state)
yep, correct. thanks -- To unsubscribe from this list: send the line "unsubscribe netdev" in
