From: David Miller Subject: Re: [PATCH] VSOCK: Don't call vsock_stream_has_data in atomic context Date: Fri, 24 Nov 2017 01:29:23 +0900 (KST) Message-ID: <20171124.012923.129711433515883419.davem@davemloft.net> References: <1511261184-45913-1-git-send-email-jhansen@vmware.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, gregkh@linuxfoundation.org, pv-drivers@vmware.com To: jhansen@vmware.com Return-path: In-Reply-To: <1511261184-45913-1-git-send-email-jhansen@vmware.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Jorgen Hansen Date: Tue, 21 Nov 2017 02:46:24 -0800 > When using the host personality, VMCI will grab a mutex for any > queue pair access. In the detach callback for the vmci vsock > transport, we call vsock_stream_has_data while holding a spinlock, > and vsock_stream_has_data will access a queue pair. > > To avoid this, we can simply omit calling vsock_stream_has_data > for host side queue pairs, since the QPs are empty per default > when the guest has detached. > > This bug affects users of VMware Workstation using kernel version > 4.4 and later. > > Testing: Ran vsock tests between guest and host, and verified that > with this change, the host isn't calling vsock_stream_has_data > during detach. Ran mixedTest between guest and host using both > guest and host as server. > > Reviewed-by: Adit Ranadive > Reviewed-by: Aditya Sarwade > Signed-off-by: Jorgen Hansen This doesn't apply cleanly to the current 'net' GIT tree.