From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
Olivier Moysan <olivier.moysan@st.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-iio@vger.kernel.org,
Arnaud Pouliquen <arnaud.pouliquen@st.com>,
Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: Re: [PATCH 0/2] Make cb a required parameter of buffer-cb
Date: Sat, 28 Nov 2020 13:25:51 +0000 [thread overview]
Message-ID: <20201128132551.4006f293@archlinux> (raw)
In-Reply-To: <20201121161457.957-1-nuno.sa@analog.com>
On Sat, 21 Nov 2020 17:14:55 +0100
Nuno Sá <nuno.sa@analog.com> wrote:
> When going through the code of the buffer-cb interface and all it's
> users, I realized that the stm32_adfsdm driver is calling
> `iio_channel_get_all_cb()` with NULL for the cb. After going a bit
> trough the stm drivers, it looks like this is actually intentional.
> However, it is clear that we have a clear/direct route here for a NULL
> pointer dereference. This change makes cb a required parameter of the
> API.
>
> The first patch makes the necessary changes to the stm32_adfsdm driver
> so that it does not break.
>
> Nuno Sá (1):
> iio: buffer: Return error if no callback is given
>
> Olivier Moysan (1):
> ASoC: stm32: dfsdm: add stm32_adfsdm_dummy_cb() callback
>
> drivers/iio/buffer/industrialio-buffer-cb.c | 5 +++++
> sound/soc/stm/stm32_adfsdm.c | 12 +++++++++++-
> 2 files changed, 16 insertions(+), 1 deletion(-)
>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to do their magic.
Thanks,
Jonathan
prev parent reply other threads:[~2020-11-28 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-21 16:14 [PATCH 0/2] Make cb a required parameter of buffer-cb Nuno Sá
2020-11-21 16:14 ` [PATCH 1/2] ASoC: stm32: dfsdm: add stm32_adfsdm_dummy_cb() callback Nuno Sá
2020-11-23 13:51 ` Mark Brown
2020-11-21 16:14 ` [PATCH 2/2] iio: buffer: Return error if no callback is given Nuno Sá
2020-11-23 8:40 ` Olivier MOYSAN
2020-11-22 16:19 ` [PATCH 0/2] Make cb a required parameter of buffer-cb Jonathan Cameron
2020-11-28 13:25 ` Jonathan Cameron [this message]
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=20201128132551.4006f293@archlinux \
--to=jic23@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@st.com \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=olivier.moysan@st.com \
--cc=pmeerw@pmeerw.net \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).