aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorYuan Can <[email protected]>2022-11-08 10:17:05 +0000
committerMichael S. Tsirkin <[email protected]>2022-12-28 05:28:10 -0500
commit7a4efe182ca61fb3e5307e69b261c57cbf434cd4 (patch)
tree3a139679f86815dbd8c4a1bae4b7a8b897fe4d97 /scripts/gdb/linux/tasks.py
parentaeca7ff254843d49a8739f07f7dab1341450111d (diff)
vhost/vsock: Fix error handling in vhost_vsock_init()
A problem about modprobe vhost_vsock failed is triggered with the following log given: modprobe: ERROR: could not insert 'vhost_vsock': Device or resource busy The reason is that vhost_vsock_init() returns misc_register() directly without checking its return value, if misc_register() failed, it returns without calling vsock_core_unregister() on vhost_transport, resulting the vhost_vsock can never be installed later. A simple call graph is shown as below: vhost_vsock_init() vsock_core_register() # register vhost_transport misc_register() device_create_with_groups() device_create_groups_vargs() dev = kzalloc(...) # OOM happened # return without unregister vhost_transport Fix by calling vsock_core_unregister() when misc_register() returns error. Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko") Signed-off-by: Yuan Can <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Acked-by: Jason Wang <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions