linux-brain/net/vmw_vsock
Cong Wang 62209d1f27 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:48:35 +02:00
..
af_vsock.c vsock: split dwork to avoid reinitializations 2018-08-22 07:48:35 +02:00
Kconfig treewide: Fix typo in Kconfig 2013-10-14 15:23:02 +02:00
Makefile VSOCK: Introduce VM Sockets 2013-02-10 19:41:08 -05:00
vmci_transport_notify_qstate.c net: Fix use after free by removing length arg from sk_data_ready callbacks. 2014-04-11 16:15:36 -04:00
vmci_transport_notify.c net: Fix use after free by removing length arg from sk_data_ready callbacks. 2014-04-11 16:15:36 -04:00
vmci_transport_notify.h VSOCK: Introduce VM Sockets 2013-02-10 19:41:08 -05:00
vmci_transport.c vsock: split dwork to avoid reinitializations 2018-08-22 07:48:35 +02:00
vmci_transport.h VSOCK: sock_put wasn't safe to call in interrupt context 2015-10-22 07:21:05 -07:00
vsock_addr.c VSOCK: Move af_vsock.h and vsock_addr.h to include/net 2013-07-27 22:14:06 -07:00