linux-stable/net/vmw_vsock
Paolo Abeni 28beec65ab vsock: cope with memory allocation failure at socket creation time
[ Upstream commit 225d946426 ]

In the unlikely event that the kmalloc call in vmci_transport_socket_init()
fails, we end-up calling vmci_transport_destruct() with a NULL vmci_trans()
and oopsing.

This change addresses the above explicitly checking for zero vmci_trans()
at destruction time.

Reported-by: Xiumei Mu <xmu@redhat.com>
Fixes: d021c34405 ("VSOCK: Introduce VM Sockets")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-23 09:06:42 +01:00
..
af_vsock.c vsock: split dwork to avoid reinitializations 2018-08-22 07:46:08 +02:00
af_vsock_tap.c VSOCK: Add vsockmon tap functions 2017-04-24 12:35:56 -04:00
hyperv_transport.c VSOCK: fix outdated sk_state value in hvs_release() 2018-02-25 11:07:59 +01:00
Kconfig hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK) 2017-08-28 15:38:18 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
virtio_transport.c VSOCK: fix loopback on big-endian systems 2018-07-22 14:28:47 +02:00
virtio_transport_common.c net: manual clean code which call skb_put_[data:zero] 2017-06-20 13:30:15 -04:00
vmci_transport.c vsock: cope with memory allocation failure at socket creation time 2019-02-23 09:06:42 +01:00
vmci_transport.h VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vmci_transport_notify.c ATM: use designated initializers 2016-12-17 11:56:57 -05:00
vmci_transport_notify.h VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vmci_transport_notify_qstate.c ATM: use designated initializers 2016-12-17 11:56:57 -05:00
vsock_addr.c