[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220310190024.0eaa76b9@hermes.local>
Date: Thu, 10 Mar 2022 19:00:24 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
wei.liu@...nel.org, decui@...rosoft.com, davem@...emloft.net,
kuba@...nel.org, ast@...nel.org, daniel@...earbox.net,
hawk@...nel.org, john.fastabend@...il.com, andrii@...nel.org,
kafai@...com, songliubraving@...com, yhs@...com,
kpsingh@...nel.org, linux-hyperv@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH] hv_netvsc: Add check for kvmalloc_array
On Fri, 11 Mar 2022 10:43:44 +0800
Jiasheng Jiang <jiasheng@...as.ac.cn> wrote:
> + if (!pcpu_sum) {
> + for (j = 0; j < i; j++)
> + data[j] = 0;
> + return
Why is unrolled zero (memset) needed? The data area comes from
ethtool_get_stats and is already zeroed (vzalloc).
There does look like at TOCTOU error here with on the number of stats.
Code doesn't look hotplug safe.
Not sure, but that issue might have been raised during review.
Powered by blists - more mailing lists