On Wed, May 18, 2016 at 1:30 AM, Simon Horman <simon.hor...@netronome.com> wrote: > During initialisation sk->sk_user_data should be initialised before > it is referenced via a call to gue_encap_init().
Or just use 'fou' directly? diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index eeec7d6..0b7a983 100644 --- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c @@ -453,7 +453,7 @@ static int fou_encap_init(struct sock *sk, struct fou *fou, struct fou_cfg *cfg) udp_sk(sk)->encap_rcv = fou_udp_recv; udp_sk(sk)->gro_receive = fou_gro_receive; udp_sk(sk)->gro_complete = fou_gro_complete; - fou_from_sock(sk)->protocol = cfg->protocol; + fou->protocol = cfg->protocol; return 0; }