lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH][next] net: mana: Use struct_size() helper in mana_gd_create_dma_region()
Date
> From: Gustavo A. R. Silva <gustavoars@kernel.org>
> Sent: Monday, January 24, 2022 1:44 PM
> ...
> 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/net/ethernet/microsoft/mana/gdma_main.c:677:24: warning: using
> sizeof on a flexible structure
> ...
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Dexuan Cui <decui@microsoft.com>

\
 
 \ /
  Last update: 2022-01-25 00:11    [W:0.042 / U:2.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site