Received: by 10.213.65.68 with SMTP id h4csp421756imn; Fri, 16 Mar 2018 07:17:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELtpovjNV8F0qzzmS03pfiL1QOMwsZcnzuxQGkH97a8hk0MC+iA8CxP8LzXQn4Mou4Q6cG0K X-Received: by 2002:a17:902:bc41:: with SMTP id t1-v6mr2339368plz.56.1521209879403; Fri, 16 Mar 2018 07:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521209879; cv=none; d=google.com; s=arc-20160816; b=Xg9D1MBnJeFOX45qx9zaRPbnWKckUxptjzzZ/jdPGklnn546yuLo3uiktI7ofJ79ES Pb6sOCbhNDu3JPEwwnoI7xiUQsMlKmpA35pBLbr1v9sTJXae5Kr7pYVyToql6ysNYZiL s37EVv3nnbS4vNrmhFFlOCWSD63ED/RxhlrEoHxvU/1qEcCjNfmi440peFRDBuMhqJ0G w8QOb+Iw2eQXCI7lJqWt8tT/WnZBwhKaA5XWRcFHMpAroirn+xjnQlUUqD3MEDSCflgz 63+1CKCkkTbRfgUCL0SYCAvf/RIJzBvfqQEFt2oguD3RdyLbniKX4AY1eYaB5Gw7SOij Mang== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=kPJEAMMp3qOAuWwkE6F5OjHlfmCet6j6Ix8he/gRxrc=; b=vButyX4tgu3MwDT71UOpAPjLqwaJ2M3iaQc/eXyf8KdXTYBxBPhSv3CxHFZjVchkWp rpQTI38Y2DECS7cGwQC9hg8PZGlNSzn0J8czJpTORWRXzG6mYhHPoLJ30Z51/728RfXs +EHvFgH7GgmeEunN76RUjZTkRIhf/MR0zB40a+k3DWDsmYMOKyo0HVW16GwNkjktQCd4 KrzAyzfOnmh8fKaC5Opz8Mxdio3djEQi6nNMEP3dJFgbTOP5vpPvFI062licodmOuP2k x4+ExG2X3eU8rxyWzOZptdMj9eHdSEFNE483+3fpGA/7849Nw4LB5XMBpNvfOuVlA5M6 rZLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si812467pgd.103.2018.03.16.07.17.44; Fri, 16 Mar 2018 07:17:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752734AbeCPOQk (ORCPT + 99 others); Fri, 16 Mar 2018 10:16:40 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:60340 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752439AbeCPOQh (ORCPT ); Fri, 16 Mar 2018 10:16:37 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id F103414621840; Fri, 16 Mar 2018 07:16:36 -0700 (PDT) Date: Fri, 16 Mar 2018 10:16:36 -0400 (EDT) Message-Id: <20180316.101636.803564728843702383.davem@davemloft.net> To: mgamal@redhat.com Cc: netdev@vger.kernel.org, sthemmin@microsoft.com, devel@linuxdriverproject.org, vkuznets@redhat.com, otubo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send From: David Miller In-Reply-To: <1520968010-20733-1-git-send-email-mgamal@redhat.com> References: <1520968010-20733-1-git-send-email-mgamal@redhat.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 16 Mar 2018 07:16:37 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.