Re: [PATCH net] fou: avoid using sk_user_data before it is initialised

2016-05-19 Thread Simon Horman
On Thu, May 19, 2016 at 10:17:40PM -0700, Cong Wang wrote: > On Wed, May 18, 2016 at 10:16 AM, Tom Herbert wrote: > > On Wed, May 18, 2016 at 10:07 AM, Cong Wang > > wrote: > >> On Wed, May 18, 2016 at 9:30 AM, Tom Herbert wrote: > >>> On Wed, May 18, 2016 at 1:30 AM, Simon Horman > >>> wrote:

Re: [PATCH net] fou: avoid using sk_user_data before it is initialised

2016-05-19 Thread Cong Wang
On Wed, May 18, 2016 at 10:16 AM, Tom Herbert wrote: > On Wed, May 18, 2016 at 10:07 AM, Cong Wang wrote: >> On Wed, May 18, 2016 at 9:30 AM, Tom Herbert wrote: >>> On Wed, May 18, 2016 at 1:30 AM, Simon Horman >>> wrote: During initialisation sk->sk_user_data should be initialised before

Re: [PATCH net] fou: avoid using sk_user_data before it is initialised

2016-05-18 Thread Tom Herbert
On Wed, May 18, 2016 at 10:07 AM, Cong Wang wrote: > On Wed, May 18, 2016 at 9:30 AM, Tom Herbert wrote: >> On Wed, May 18, 2016 at 1:30 AM, Simon Horman >> wrote: >>> During initialisation sk->sk_user_data should be initialised before >>> it is referenced via a call to gue_encap_init(). >>> >>

Re: [PATCH net] fou: avoid using sk_user_data before it is initialised

2016-05-18 Thread Cong Wang
On Wed, May 18, 2016 at 9:30 AM, Tom Herbert wrote: > On Wed, May 18, 2016 at 1:30 AM, Simon Horman > wrote: >> During initialisation sk->sk_user_data should be initialised before >> it is referenced via a call to gue_encap_init(). >> > I think this is should be fixed by proposed patch "fou: > Ca

Re: [PATCH net] fou: avoid using sk_user_data before it is initialised

2016-05-18 Thread Cong Wang
On Wed, May 18, 2016 at 1:30 AM, Simon Horman 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.

Re: [PATCH net] fou: avoid using sk_user_data before it is initialised

2016-05-18 Thread Tom Herbert
On Wed, May 18, 2016 at 1:30 AM, Simon Horman wrote: > During initialisation sk->sk_user_data should be initialised before > it is referenced via a call to gue_encap_init(). > I think this is should be fixed by proposed patch "fou: Call-setup_udp_tunnel_sock". Thanks, Tom > Found by bisection af

[PATCH net] fou: avoid using sk_user_data before it is initialised

2016-05-18 Thread Simon Horman
During initialisation sk->sk_user_data should be initialised before it is referenced via a call to gue_encap_init(). Found by bisection after noticing the following: $ ip fou add port ipproto 47 [0.383417] BUG: unable to handle kernel NULL pointer dereference at 0008 [0.