[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWfvcRMoXPsuOq6fi1TufzOYZWCg0FwpyDN2WNbTd3gmg@mail.gmail.com>
Date: Wed, 18 May 2016 09:46:13 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Simon Horman <simon.horman@...ronome.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Tom Herbert <tom@...bertland.com>
Subject: Re: [PATCH net] fou: avoid using sk_user_data before it is initialised
On Wed, May 18, 2016 at 1:30 AM, Simon Horman
<simon.horman@...ronome.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;
}
Powered by blists - more mailing lists