[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171026082116.GB29733@stefanha-x1.localdomain>
Date: Thu, 26 Oct 2017 10:21:16 +0200
From: Stefan Hajnoczi <stefanha@...hat.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: netdev@...r.kernel.org, Jorgen Hansen <jhansen@...are.com>
Subject: Re: [Patch net-next] vsock: always call vsock_init_tables()
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 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@...hat.com>
> Cc: Jorgen Hansen <jhansen@...are.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
> net/vmw_vsock/af_vsock.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Thank you, Cong Wang! I was just trying to figure out the syzkaller bug
report and you've already fixed it :). The patch looks good.
Reviewed-by: Stefan Hajnoczi <stefanha@...hat.com>
Powered by blists - more mailing lists