From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send Date: Fri, 16 Mar 2018 10:16:36 -0400 (EDT) Message-ID: <20180316.101636.803564728843702383.davem@davemloft.net> References: <1520968010-20733-1-git-send-email-mgamal@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, sthemmin@microsoft.com, devel@linuxdriverproject.org, vkuznets@redhat.com, otubo@redhat.com, linux-kernel@vger.kernel.org To: mgamal@redhat.com Return-path: In-Reply-To: <1520968010-20733-1-git-send-email-mgamal@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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 channel ring buffers, which can then be > accessed by netvsc_send_pkt() before they're allocated on calling > netvsc_device_add() > > The patch fixes this problem by checking the channel state and returning > ENODEV if not yet opened. We also move the call to hv_ringbuf_avail_percent() > which may access the uninitialized ring buffer. > > Signed-off-by: Mohammed Gamal Based upon the discusion on this patch, it looks like this will be fixed in some other way.