[PATCH] dma-buf: use struct_size helper instead of kzalloc

2022-07-27 Thread Arvind Yadav
Replace zero-length array allocation with flexible-array member because Dynamic calculations should not be performed for memory allocator due to the risk of them overflowing. So using struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Signed-off-by

[PATCH] dma-buf: use struct_size helper instead of kzalloc

2022-07-25 Thread Arvind Yadav
Replace zero-length array allocation with flexible-array member because Dynamic calculations should not be performed for memory allocator due to the risk of them overflowing. So using struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Signed-off-by