diff options
| author | Benjamin Marzinski <[email protected]> | 2025-04-15 04:17:16 +0000 |
|---|---|---|
| committer | Mikulas Patocka <[email protected]> | 2025-04-28 11:11:33 +0000 |
| commit | 5a2a6c428190f945c5cbf5791f72dbea83e97f66 (patch) | |
| tree | cf8b02431e01f2f137c14c3fc557e72ff8589730 /drivers/firmware/psci/psci.c | |
| parent | dm-integrity: fix a warning on invalid table line (diff) | |
| download | kernel-5a2a6c428190f945c5cbf5791f72dbea83e97f66.tar.gz kernel-5a2a6c428190f945c5cbf5791f72dbea83e97f66.zip | |
dm: always update the array size in realloc_argv on success
realloc_argv() was only updating the array size if it was called with
old_argv already allocated. The first time it was called to create an
argv array, it would allocate the array but return the array size as
zero. dm_split_args() would think that it couldn't store any arguments
in the array and would call realloc_argv() again, causing it to
reallocate the initial slots (this time using GPF_KERNEL) and finally
return a size. Aside from being wasteful, this could cause deadlocks on
targets that need to process messages without starting new IO. Instead,
realloc_argv should always update the allocated array size on success.
Fixes: a0651926553c ("dm table: don't copy from a NULL pointer in realloc_argv()")
Cc: [email protected]
Signed-off-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Mikulas Patocka <[email protected]>
Diffstat (limited to 'drivers/firmware/psci/psci.c')
0 files changed, 0 insertions, 0 deletions
