Re: [Patch net-next] vsock: always call vsock_init_tables()

2017-10-26 Thread David Miller
From: Cong Wang 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 uninitia

Re: [Patch net-next] vsock: always call vsock_init_tables()

2017-10-26 Thread Stefan Hajnoczi
On Tue, Oct 24, 2017 at 03:30:37PM -0700, Cong Wang wrote: > 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 unini

[Patch net-next] vsock: always call vsock_init_tables()

2017-10-24 Thread Cong Wang
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_ini