Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-12 Thread David Miller
From: Vitaly Kuznetsov Date: Thu, 11 Aug 2016 12:58:55 +0200 > We reset vf_inject on VF going down (netvsc_vf_down()) but we don't on > VF removal (netvsc_unregister_vf()) so vf_inject stays 'true' while > vf_netdev is already NULL and we're trying to inject packets into NULL > net device in netv

Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-12 Thread Stephen Hemminger
On Thu, 11 Aug 2016 14:09:53 +0200 Vitaly Kuznetsov wrote: > Yuval Mintz writes: > > >> +static void netvsc_inject_enable(struct net_device_context > >> +*net_device_ctx) { > >> + net_device_ctx->vf_inject = true; > >> +} > >> + > >> +static void netvsc_inject_disable(struct net_device_context

RE: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: net...@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-kernel@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net

Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Vitaly Kuznetsov
Yuval Mintz writes: >> +static void netvsc_inject_enable(struct net_device_context >> +*net_device_ctx) { >> +net_device_ctx->vf_inject = true; >> +} >> + >> +static void netvsc_inject_disable(struct net_device_context >> +*net_device_ctx) { >> +net_device_ctx->vf_inject = false; >> + >>

RE: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Yuval Mintz
> +static void netvsc_inject_enable(struct net_device_context > +*net_device_ctx) { > + net_device_ctx->vf_inject = true; > +} > + > +static void netvsc_inject_disable(struct net_device_context > +*net_device_ctx) { > + net_device_ctx->vf_inject = false; > + > + /* Wait for currently ac

[PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Vitaly Kuznetsov
We reset vf_inject on VF going down (netvsc_vf_down()) but we don't on VF removal (netvsc_unregister_vf()) so vf_inject stays 'true' while vf_netdev is already NULL and we're trying to inject packets into NULL net device in netvsc_recv_callback() causing kernel to crash. Signed-off-by: Vitaly Kuzn