summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorSreeraj S Kurup <sreekuttan2156239@gmail.com>2026-11-19 10:48:59 +0000
committerTakashi Iwai <tiwai@suse.de>2026-11-19 13:33:56 +0100
commit9a4a81718b057eb8768ea87aceacafdfaf3a8b38 (patch)
treee10f1e45bfe6176fb96831d9d2fa6db85d4b3291 /rust/kernel/alloc
parent029266e696205a85ec0de3ed823ada03055d0f99 (diff)
ALSA: memalloc: Fix DMA allocation retry cleanup
do_alloc_pages() retries allocation with lower DMA zones when the allocated address exceeds the device's coherent DMA mask. However, the previous allocation is not freed before retrying, leaking the allocated pages. Also, if no suitable DMA zone is available, the function can return an allocation outside the device's DMA mask. Avoid retrying GFP_DMA32 after GFP_DMA has been selected, and skip the DMA mask check when the coherent DMA mask is unset. Free the allocated pages before retrying and return NULL when no suitable allocation can be obtained. Fixes: dd164fbfdc20 ("ALSA: memalloc: Drop special handling of GFP for CONTINUOUS allocation") Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com> Link: https://patch.msgid.link/20261119104859.2807-1-sreekuttan2156239@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions