Re: [PATCH][next] drm/i915/guc: Use struct_size() helper in kmalloc()

2022-01-26 Thread Tvrtko Ursulin
On 25/01/2022 18:07, Gustavo A. R. Silva wrote: Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. Also, address the following sparse warnings:

[PATCH][next] drm/i915/guc: Use struct_size() helper in kmalloc()

2022-01-25 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. Also, address the following sparse warnings: drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c:792:23: