• Cong Wang's avatar
    vsock: split dwork to avoid reinitializations · 36e55fde
    Cong Wang authored
    [ Upstream commit 455f05ec ]
    
    syzbot reported that we reinitialize an active delayed
    work in vsock_stream_connect():
    
    	ODEBUG: init active (active state 0) object type: timer_list hint:
    	delayed_work_timer_fn+0x0/0x90 kernel/workqueue.c:1414
    	WARNING: CPU: 1 PID: 11518 at lib/debugobjects.c:329
    	debug_print_object+0x16a/0x210 lib/debugobjects.c:326
    
    The pattern is apparently wrong, we should only initialize
    the dealyed work once and could repeatly schedule it. So we
    have to move out the initializations to allocation side.
    And to avoid confusion, we can split the shared dwork
    into two, instead of re-using the same one.
    
    Fixes: d021c344 ("VSOCK: Introduce VM Sockets")
    Reported-by: <syzbot+8a9b1bd330476a4f3db6@syzkaller.appspotmail.com>
    Cc: Andy king <acking@vmware.com>
    Cc: Stefan Hajnoczi <stefanha@redhat.com>
    Cc: Jorgen Hansen <jhansen@vmware.com>
    Signed-off-by: 's avatarCong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    36e55fde
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
af_vsock.c Loading commit data...
af_vsock_tap.c Loading commit data...
hyperv_transport.c Loading commit data...
virtio_transport.c Loading commit data...
virtio_transport_common.c Loading commit data...
vmci_transport.c Loading commit data...
vmci_transport.h Loading commit data...
vmci_transport_notify.c Loading commit data...
vmci_transport_notify.h Loading commit data...
vmci_transport_notify_qstate.c Loading commit data...
vsock_addr.c Loading commit data...