[PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-13 Thread Mohammed Gamal
Dring high network traffic changes to network interface parameters such as number of channels or MTU can cause a kernel panic with a NULL pointer dereference. This is due to netvsc_device_remove() being called and deallocating the channel ring buffers, which can then be accessed by netvsc_send_pkt(

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-13 Thread Stephen Hemminger
On Tue, 13 Mar 2018 20:06:50 +0100 Mohammed Gamal wrote: > Dring high network traffic changes to network interface parameters > such as number of channels or MTU can cause a kernel panic with a NULL > pointer dereference. This is due to netvsc_device_remove() being > called and deallocating the c

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-14 Thread Dan Carpenter
On Tue, Mar 13, 2018 at 08:06:50PM +0100, Mohammed Gamal wrote: > @@ -791,6 +791,7 @@ static inline int netvsc_send_pkt( > > VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); > } > > + ring_avail = hv_ringbuf_avail_percent(&out_channel->outbound); >

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-14 Thread Mohammed Gamal
On Tue, 2018-03-13 at 12:35 -0700, Stephen Hemminger wrote: > On Tue, 13 Mar 2018 20:06:50 +0100 > Mohammed Gamal wrote: > > > Dring high network traffic changes to network interface parameters > > such as number of channels or MTU can cause a kernel panic with a > > NULL > > pointer dereference.

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-15 Thread Mohammed Gamal
On Wed, 2018-03-14 at 10:22 +0100, Mohammed Gamal wrote: > On Tue, 2018-03-13 at 12:35 -0700, Stephen Hemminger wrote: > > On Tue, 13 Mar 2018 20:06:50 +0100 > > Mohammed Gamal wrote: > > > > > Dring high network traffic changes to network interface > > > parameters > > > such as number of channe

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-15 Thread Stephen Hemminger
On Thu, 15 Mar 2018 17:24:13 +0100 Mohammed Gamal wrote: > On Wed, 2018-03-14 at 10:22 +0100, Mohammed Gamal wrote: > > On Tue, 2018-03-13 at 12:35 -0700, Stephen Hemminger wrote: > > > On Tue, 13 Mar 2018 20:06:50 +0100 > > > Mohammed Gamal wrote: > > > > > > > Dring high network traffic c

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-16 Thread David Miller
From: Mohammed Gamal Date: Tue, 13 Mar 2018 20:06:50 +0100 > Dring high network traffic changes to network interface parameters > such as number of channels or MTU can cause a kernel panic with a NULL > pointer dereference. This is due to netvsc_device_remove() being > called and deallocating the