diff options
author | John Harrison <[email protected]> | 2022-12-21 11:30:31 -0800 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2022-12-30 03:04:45 -0500 |
commit | 11ce8fd8fd8718247f17475802639cd7e2d3765c (patch) | |
tree | 5b0dcd24c6d41724dae62b6c7d81ff59fc27975b /drivers/usb/cdns3 | |
parent | 3f882f2d4f689627c1566c2c92087bc3ff734953 (diff) |
drm/i915/uc: Fix two issues with over-size firmware files
In the case where a firmware file is too large (e.g. someone
downloaded a web page ASCII dump from github...), the firmware object
is released but the pointer is not zerod. If no other firmware file
was found then release would be called again leading to a double kfree.
Also, the size check was only being applied to the initial firmware
load not any of the subsequent attempts. So move the check into a
wrapper that is used for all loads.
Fixes: 016241168dc5 ("drm/i915/uc: use different ggtt pin offsets for uc loads")
Signed-off-by: John Harrison <[email protected]>
Reviewed-by: Daniele Ceraolo Spurio <[email protected]>
Cc: Alan Previn <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Matt Roper <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Matthew Auld <[email protected]>
Cc: "Thomas Hellström" <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 4071d98b296a5bc5fd4b15ec651bd05800ec9510)
Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3')
0 files changed, 0 insertions, 0 deletions