Re: [PATCH] accel/habanalabs: use kcalloc() instead of kzalloc()

2024-01-25 Thread Oded Gabbay
On 22/01/2024 18:45, Gustavo A. R. Silva wrote: On 1/20/24 09:10, Erick Archer wrote: As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or

Re: [PATCH] accel/habanalabs: use kcalloc() instead of kzalloc()

2024-01-22 Thread Gustavo A. R. Silva
On 1/20/24 09:10, Erick Archer wrote: As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them

[PATCH] accel/habanalabs: use kcalloc() instead of kzalloc()

2024-01-20 Thread Erick Archer
As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values