linux/net/vmw_vsock
Cong Wang 36e55fde4c vsock: split dwork to avoid reinitializations
[ Upstream commit 455f05ecd2 ]

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: d021c34405 ("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: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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
af_vsock.c vsock: split dwork to avoid reinitializations 2018-08-22 07:46:08 +02: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_common.c net: manual clean code which call skb_put_[data:zero] 2017-06-20 13:30:15 -04:00
virtio_transport.c VSOCK: fix loopback on big-endian systems 2018-07-22 14:28:47 +02:00
vmci_transport_notify_qstate.c ATM: use designated initializers 2016-12-17 11:56:57 -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.c vsock: split dwork to avoid reinitializations 2018-08-22 07:46:08 +02:00
vmci_transport.h VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vsock_addr.c VSOCK: Move af_vsock.h and vsock_addr.h to include/net 2013-07-27 22:14:06 -07:00