From: Mark Brown <broonie@kernel.org> To: Tzung-Bi Shih <tzungbi@google.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com>, ALSA development <alsa-devel@alsa-project.org>, Dylan Reid <dgreid@google.com>, Jimmy Cheng-Yi Chiang <cychiang@google.com>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, Takashi Iwai <tiwai@suse.de> Subject: Re: [alsa-devel] [PATCH v2] ASoC: max98090: save and restore SHDN when changing sensitive registers Date: Wed, 18 Dec 2019 13:26:20 +0000 [thread overview] Message-ID: <20191218132620.GE3219@sirena.org.uk> (raw) In-Reply-To: <CA+Px+wXPa_cwdZUQfCx4jAhhj4Q9b7bNABUGazLKOJ7U5ae-mA@mail.gmail.com> [-- Attachment #1: Type: text/plain, Size: 946 bytes --] On Fri, Dec 13, 2019 at 02:05:32AM +0800, Tzung-Bi Shih wrote: > I have no enough resources to test and trace the code temporarily. > But is it possible: > - snd_card_new( ) succeed in snd_soc_bind_card( ), so that userspace > can see the control This feels like snd_card_new() is being overly enthusiastic here, I'd expect that we might have other problems elsewhere with that. I'd not expect userspace to see things until snd_card_register() since between _new() and that we're in the process of building the card up. Given this we *will* need to handle partially constructed cards after all, unless we change the ALSA core. Takashi? > - code in later snd_soc_bind_card( ) decided to defer the probe > - soc_cleanup_card_resources( ) may forget to clean the control? (not > sure about this) There's going to be a race condition where userspace can see the control on the partially built card regardless of if it gets cleaned up or not. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org> To: Tzung-Bi Shih <tzungbi@google.com> Cc: ALSA development <alsa-devel@alsa-project.org>, Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>, Jimmy Cheng-Yi Chiang <cychiang@google.com>, Takashi Iwai <tiwai@suse.de>, Krzysztof Kozlowski <krzk@kernel.org>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Dylan Reid <dgreid@google.com>, Marek Szyprowski <m.szyprowski@samsung.com> Subject: Re: [alsa-devel] [PATCH v2] ASoC: max98090: save and restore SHDN when changing sensitive registers Date: Wed, 18 Dec 2019 13:26:20 +0000 [thread overview] Message-ID: <20191218132620.GE3219@sirena.org.uk> (raw) In-Reply-To: <CA+Px+wXPa_cwdZUQfCx4jAhhj4Q9b7bNABUGazLKOJ7U5ae-mA@mail.gmail.com> [-- Attachment #1.1: Type: text/plain, Size: 946 bytes --] On Fri, Dec 13, 2019 at 02:05:32AM +0800, Tzung-Bi Shih wrote: > I have no enough resources to test and trace the code temporarily. > But is it possible: > - snd_card_new( ) succeed in snd_soc_bind_card( ), so that userspace > can see the control This feels like snd_card_new() is being overly enthusiastic here, I'd expect that we might have other problems elsewhere with that. I'd not expect userspace to see things until snd_card_register() since between _new() and that we're in the process of building the card up. Given this we *will* need to handle partially constructed cards after all, unless we change the ALSA core. Takashi? > - code in later snd_soc_bind_card( ) decided to defer the probe > - soc_cleanup_card_resources( ) may forget to clean the control? (not > sure about this) There's going to be a race condition where userspace can see the control on the partially built card regardless of if it gets cleaned up or not. [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] [-- Attachment #2: Type: text/plain, Size: 161 bytes --] _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-12-18 13:26 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20191128152110epcas3p2b205b4b55f6d8bfac42fcb8faaade93c@epcas3p2.samsung.com> 2019-11-28 15:19 ` [alsa-devel] [PATCH v2] ASoC: max98090: save and restore SHDN when changing sensitive registers Tzung-Bi Shih 2019-12-09 18:59 ` [alsa-devel] Applied "ASoC: max98090: save and restore SHDN when changing sensitive registers" to the asoc tree Mark Brown 2019-12-12 14:09 ` [alsa-devel] [PATCH v2] ASoC: max98090: save and restore SHDN when changing sensitive registers Marek Szyprowski 2019-12-12 14:09 ` Marek Szyprowski 2019-12-12 16:02 ` Marek Szyprowski 2019-12-12 16:02 ` Marek Szyprowski 2019-12-12 16:48 ` Mark Brown 2019-12-12 16:48 ` Mark Brown 2019-12-12 18:05 ` Tzung-Bi Shih 2019-12-12 18:05 ` Tzung-Bi Shih 2019-12-17 14:18 ` Marek Szyprowski 2019-12-17 14:18 ` Marek Szyprowski 2019-12-18 13:26 ` Mark Brown [this message] 2019-12-18 13:26 ` Mark Brown 2019-12-18 14:48 ` Marek Szyprowski 2019-12-18 14:48 ` Marek Szyprowski 2019-12-18 16:24 ` Mark Brown 2019-12-18 16:24 ` Mark Brown 2019-12-19 8:03 ` Marek Szyprowski 2019-12-19 8:03 ` Marek Szyprowski 2019-12-19 12:37 ` Mark Brown 2019-12-19 12:37 ` Mark Brown 2019-12-19 12:54 ` Marek Szyprowski 2019-12-19 12:54 ` Marek Szyprowski 2019-12-19 13:05 ` Mark Brown 2019-12-19 13:05 ` Mark Brown 2019-12-19 13:41 ` Marek Szyprowski 2019-12-19 13:41 ` Marek Szyprowski 2019-12-19 19:16 ` Mark Brown 2019-12-19 19:16 ` Mark Brown 2019-12-20 8:28 ` Marek Szyprowski 2019-12-20 8:28 ` Marek Szyprowski 2019-12-20 9:05 ` Marek Szyprowski 2019-12-20 9:05 ` Marek Szyprowski 2019-12-20 12:01 ` Mark Brown 2019-12-20 12:01 ` Mark Brown 2020-01-08 11:54 ` Marek Szyprowski 2020-01-08 11:54 ` Marek Szyprowski 2020-01-09 21:18 ` Mark Brown 2020-01-09 21:18 ` Mark Brown
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=20191218132620.GE3219@sirena.org.uk \ --to=broonie@kernel.org \ --cc=alsa-devel@alsa-project.org \ --cc=cychiang@google.com \ --cc=dgreid@google.com \ --cc=krzk@kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=m.szyprowski@samsung.com \ --cc=s.nawrocki@samsung.com \ --cc=tiwai@suse.de \ --cc=tzungbi@google.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: linkBe 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.