All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Cc: perex@perex.cz, tiwai@suse.de, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: memalloc: Fix DMA allocation retry cleanup
Date: Thu, 19 Nov 2026 13:34:16 +0100	[thread overview]
Message-ID: <87tslduhiv.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261119104859.2807-1-sreekuttan2156239@gmail.com>

On Thu, 19 Nov 2026 11:48:59 +0100,
Sreeraj S Kurup wrote:
> 
> 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>

Applied now.  Thanks.


Takashi

  reply	other threads:[~2026-11-19 12:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 10:09 [PATCH] ALSA: memalloc: Fix DMA allocation retry cleanup Sreeraj S Kurup
2026-11-19 10:25 ` sashiko-bot
2026-11-19 10:48 ` [PATCH v2] " Sreeraj S Kurup
2026-11-19 12:34   ` Takashi Iwai [this message]
2026-11-19 15:02     ` Sreeraj S Kurup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tslduhiv.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sreekuttan2156239@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.