From: Takashi Iwai <tiwai@suse.de>
To: "Benoît Sevens" <bsevens@google.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
wangdicheng <wangdicheng@kylinos.cn>,
Manuel Barrio Linares <mbarriolinares@gmail.com>,
Lianqin Hu <hulianqin@vivo.com>,
Shen Lichuan <shenlichuan@vivo.com>,
Cyan Nyan <cyan.vtb@gmail.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Fix a DMA to stack memory bug
Date: Mon, 02 Dec 2024 16:31:23 +0100 [thread overview]
Message-ID: <87frn6umno.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAGCho0Xe-jGcanAxehP+ENmrG0Otq5DzQO-yKHx7Ot_UzSRXWQ@mail.gmail.com>
On Mon, 02 Dec 2024 16:05:01 +0100,
Benoît Sevens wrote:
>
> Hi Dan,
>
> On Mon, 2 Dec 2024 at 13:57, Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > The usb_get_descriptor() function does DMA so we're not allowed
> > to use a stack buffer for that. Doing DMA to the stack is not portable
> > all architectures. Move the "new_device_descriptor" from being stored
> > on the stack and allocate it with kmalloc() instead.
> >
>
> Thanks for fixing this. It looks good to me.
>
> Note that the commit that is being fixed is already queued for
> backporting, so I don't know how this usually goes then.
We just follow the same pattern as the Linus upstream, applying the
fix on top of the previous fix.
In anyway, now I merged it. Will be included in the next PR for rc2.
Thanks!
Takashi
next prev parent reply other threads:[~2024-12-02 15:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 12:57 Dan Carpenter
2024-12-02 15:05 ` Benoît Sevens
2024-12-02 15:31 ` Takashi Iwai [this message]
2024-12-02 15:43 ` Dan Carpenter
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=87frn6umno.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=bsevens@google.com \
--cc=cyan.vtb@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=hulianqin@vivo.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mbarriolinares@gmail.com \
--cc=perex@perex.cz \
--cc=shenlichuan@vivo.com \
--cc=tiwai@suse.com \
--cc=wangdicheng@kylinos.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®