Re: [PATCH] hv_netvsc: Add check for kvmalloc_array
From: Jiasheng Jiang <hidden>
Date: 2022-03-14 08:35:34
Also in:
bpf, linux-hyperv, lkml
From: Jiasheng Jiang <hidden>
Date: 2022-03-14 08:35:34
Also in:
bpf, linux-hyperv, lkml
On Mon, Mar 14, 2022 at 04:13:59PM +0800, Greg KH wrote:
quoted
The failure of allocation is not included in the tests. And as far as I know, there is not any tool that has the ability to fail the allocation.There are tools that do this.
Thanks, could you please tell me the tools? Jiang
quoted
But I think that for safety, the cost of redundant and harmless check is acceptable. Also, checking after allocation is a good program pattern.That's fine, it's how you clean up that is the problem that not everyone gets correct, which is why it is good to verify that you do not introduce problems.