Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vsock: cope with memory allocation failure at socket creation time
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 <[email protected]> Fixes: d021c34 ("VSOCK: Introduce VM Sockets") Signed-off-by: Paolo Abeni <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Reviewed-by: Jorgen Hansen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information