On Thu, Sep 27, 2018 at 9:00 AM Eric Dumazet <eric.duma...@gmail.com> wrote: > > > > On 09/27/2018 12:15 AM, Song Liu wrote: > > Latest changes in __skb_flow_dissect() assume skb->dev has valid nd_net. > > However, this is not true for test_bpf. As a result, test_bpf.ko crashes > > the system with the following stack trace: > > > > > + dev_net_set(&dev, &net); > > This is yet another fake stuff that will break some day, so many other things > would > need to be setup properly in a real "struct net" > > What about using the current net_ns ? > > dev_net_set(&dev, current->nsproxy->net_ns); > > This might be &init_net in the context of test_bpf(), so maybe simply use > &init_net > to clearly state that test_bpf is not net ns fully ready.
Agreed. Thanks for fixing this.