From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH bpf-next] bpf: test_bpf: add dummy dev->net for flow_dissector Date: Thu, 27 Sep 2018 05:36:27 -0700 Message-ID: References: <20180927071533.2290229-1-songliubraving@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: daniel@iogearbox.net, kernel-team@fb.com, Willem de Bruijn , Petar Penkov To: Song Liu , netdev@vger.kernel.org Return-path: Received: from mail-pg1-f196.google.com ([209.85.215.196]:33524 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727223AbeI0Sye (ORCPT ); Thu, 27 Sep 2018 14:54:34 -0400 Received: by mail-pg1-f196.google.com with SMTP id y18-v6so1896420pge.0 for ; Thu, 27 Sep 2018 05:36:29 -0700 (PDT) In-Reply-To: <20180927071533.2290229-1-songliubraving@fb.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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: > > > This patch fixes tes_bpf by adding a dummy struct net to the dummy dev. > > Fixes: d0e13a1488ad ("flow_dissector: lookup netns by skb->sk if skb->dev is NULL") > Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") > Cc: Willem de Bruijn > Cc: Petar Penkov > Signed-off-by: Song Liu Reported-by: Eric Dumazet Thanks.