Re: git: 6a09a7f1e9a5 - main - netlink: always zero provided header buffers.

From: Renato Botelho <garga_at_FreeBSD.org>
Date: Mon, 01 May 2023 14:30:36 UTC
On 01/05/23 11:09, Alexander V. Chernikov wrote:
> The branch main has been updated by melifaro:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=6a09a7f1e9a52fb25158ca60216c6b817f8c0b71
> 
> commit 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71
> Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
> AuthorDate: 2023-05-01 14:07:33 +0000
> Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
> CommitDate: 2023-05-01 14:09:47 +0000
> 
>      netlink: always zero provided header buffers.
>      
>      Reported by:    KMSAN
>      MFC after:      3 days
> ---
>   sys/netlink/netlink_message_writer.h | 1 +
>   sys/netlink/route/neigh.c            | 3 ---
>   2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h
> index 57fc1bf342ea..92e43834efc7 100644
> --- a/sys/netlink/netlink_message_writer.h
> +++ b/sys/netlink/netlink_message_writer.h
> @@ -225,6 +225,7 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz)
>   
>           void *data_ptr = &nw->data[nw->offset];
>           nw->offset += sz;
> +	bzero(data_ptr, sz);

At first look, this line seems to be indented wrong.  But looking at 
cgit web interface it seems that other lines are wrong and this is correct.
-- 
Renato Botelho