From: Cong Wang <[email protected]>
Date: Tue, 24 Oct 2017 15:30:37 -0700

> Although CONFIG_VSOCKETS_DIAG depends on CONFIG_VSOCKETS,
> vsock_init_tables() is not always called, it is called only
> if other modules call its caller. Therefore if we only
> enable CONFIG_VSOCKETS_DIAG, it would crash kernel on uninitialized
> vsock_bind_table.
> 
> This patch fixes it by moving vsock_init_tables() to its own
> module_init().
> 
> Fixes: 413a4317aca7 ("VSOCK: add sock_diag interface")
> Reported-by: syzkaller bot
> Cc: Stefan Hajnoczi <[email protected]>
> Cc: Jorgen Hansen <[email protected]>
> Signed-off-by: Cong Wang <[email protected]>

Applied.

Reply via email to