diff options
| author | Simon Glass <[email protected]> | 2023-11-15 18:35:23 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-11-17 11:58:26 -0500 |
| commit | 741d1e9d3f368908e3cd1861ddd707e81e1fd576 (patch) | |
| tree | e47d7a2b4615b494952fc39ce8ad819faf57ebd1 /drivers/timer/timer-uclass.c | |
| parent | 169c3cc49e40758956ee6c310f7f59a6443826a1 (diff) | |
bootstd: Avoid freeing a non-allocated buffer
EFI applications can be very large and thus used to cause boot failures
when malloc() space was exhausted.
A recent changed fixed this by using the kernel_addr_r environment var
as the address of the buffer. However, it still frees the buffer when
the bootflow is discarded.
Fix this by introducing a flag to indicate whether the buffer was
allocated, or not.
Note that kernel_addr_r is not the last word here. It might be better
to use lmb to place images. But there is a lot of refactoring to do
before we can remove the environment variables. The distro scripts rely
on them so it is safe for bootstd to do so too.
Fixes: 6a8c2f9781c bootstd: Avoid allocating memory for the EFI file
Signed-off-by: Simon Glass <[email protected]>
Reported by: Simon Glass <[email protected]>
Reported by: Shantur Rathore <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Tested-by: Shantur Rathore <[email protected]>
Diffstat (limited to 'drivers/timer/timer-uclass.c')
0 files changed, 0 insertions, 0 deletions
