diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2017-10-24 15:30:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-26 17:45:58 +0900 |
commit | c1eef220c1760762753b602c382127bfccee226d (patch) | |
tree | e2a603686a2f0957a209cc553055b0364cbed72a /net/tipc | |
parent | 3c91b0c1de8d013490bbc41ce9ee8810ea5baddd (diff) | |
download | linux-stable-c1eef220c1760762753b602c382127bfccee226d.tar.gz linux-stable-c1eef220c1760762753b602c382127bfccee226d.tar.bz2 linux-stable-c1eef220c1760762753b602c382127bfccee226d.zip |
vsock: always call vsock_init_tables()
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 <stefanha@redhat.com>
Cc: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions