Re: [PATCH 1/4] drm/amdgpu: fix a signedness bug in __verify_ras_table_checksum()

2021-07-05 Thread Luben Tuikov
Alex, I think we should pull these through amd-staging-drm-next. Regards, Luben On 2021-07-04 11:18 a.m., Luben Tuikov wrote: > Series is, > Reviewed-by: Luben Tuikov > > Regards, > Luben > > On 2021-07-03 5:44 a.m., Dan Carpenter wrote: >> If amdgpu_eeprom_read() returns a negative error code

Re: [PATCH 1/4] drm/amdgpu: fix a signedness bug in __verify_ras_table_checksum()

2021-07-04 Thread Luben Tuikov
Series is, Reviewed-by: Luben Tuikov Regards, Luben On 2021-07-03 5:44 a.m., Dan Carpenter wrote: > If amdgpu_eeprom_read() returns a negative error code then the error > handling checks: > > if (res < buf_size) { > > The problem is that "buf_size" is a u32 so negative values are type > pr

[PATCH 1/4] drm/amdgpu: fix a signedness bug in __verify_ras_table_checksum()

2021-07-03 Thread Dan Carpenter
If amdgpu_eeprom_read() returns a negative error code then the error handling checks: if (res < buf_size) { The problem is that "buf_size" is a u32 so negative values are type promoted to a high positive values and the condition is false. Fix this by changing the type of "buf_size" to in