[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpWf2hPffMSmtmHZH4rj-_1m1Abj9HsAYJ9cXGKvEYj1-Q@mail.gmail.com>
Date: Mon, 3 Sep 2018 12:56:46 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Linux Kernel Network Developers <netdev@...r.kernel.org>
Cc: Jon Maloy <jon.maloy@...csson.com>,
Ying Xue <ying.xue@...driver.com>
Subject: Re: [Patch net] tipc: call start and done ops directly in __tipc_nl_compat_dumpit()
On Mon, Sep 3, 2018 at 12:49 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> __tipc_nl_compat_dumpit() uses a netlink_callback on stack,
> so the only way to align it with other ->dumpit() call path
> is calling tipc_dump_start() and tipc_dump_done() directly
> inside it. Otherwise ->dumpit() would always get NULL from
> cb->args[0].
>
> Fixes: 9a07efa9aea2 ("tipc: switch to rhashtable iterator")
> Reported-by: syzbot+e93a2c41f91b8e2c7d9b@...kaller.appspotmail.com
> Cc: Jon Maloy <jon.maloy@...csson.com>
> Cc: Ying Xue <ying.xue@...driver.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
> net/tipc/netlink_compat.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
> index a2f76743c73a..aa05934613f2 100644
> --- a/net/tipc/netlink_compat.c
> +++ b/net/tipc/netlink_compat.c
> @@ -185,6 +185,7 @@ static int __tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,
> return -ENOMEM;
>
> buf->sk = msg->dst_sk;
> + tipc_dump_start(&cb);
Well, tipc_dump_start() uses sock_net(cb->skb->sk) which
seems not set here... I need to pass msg->dst_sk in.
I will send v2.
Powered by blists - more mailing lists