vsock: use new wait API for vsock_stream_sendmsg()
authorWANG Cong <xiyou.wangcong@gmail.com>
Fri, 19 May 2017 18:21:59 +0000 (11:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 18:39:36 +0000 (14:39 -0400)
commit499fde662f1957e3cb8d192a94a099ebe19c714b
tree657506549f0e9edf08189ae6171c7a2e966f7df4
parent72ccc471e13b8266d2ee2104521df5b92ba08e9c
vsock: use new wait API for vsock_stream_sendmsg()

As reported by Michal, vsock_stream_sendmsg() could still
sleep at vsock_stream_has_space() after prepare_to_wait():

  vsock_stream_has_space
    vmci_transport_stream_has_space
      vmci_qpair_produce_free_space
        qp_lock
          qp_acquire_queue_mutex
            mutex_lock

Just switch to the new wait API like we did for commit
d9dc8b0f8b4e ("net: fix sleeping for sk_wait_event()").

Reported-by: Michal Kubecek <mkubecek@suse.cz>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Jorgen Hansen <jhansen@vmware.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/af_vsock.c