From: Wolfram Sang <wsa@kernel.org>
To: Alain Volmat <alain.volmat@foss.st.com>
Cc: pierre-yves.mordret@foss.st.com, alexandre.torgue@foss.st.com,
linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, fabrice.gasnier@foss.st.com,
amelie.delaunay@foss.st.com
Subject: Re: [PATCH 3/3] i2c: stm32f7: prevent calling slave handling if no slave running
Date: Mon, 29 Nov 2021 13:21:05 +0100 [thread overview]
Message-ID: <YaTFsV0sIU6BA0ja@kunai> (raw)
In-Reply-To: <1625062303-15327-4-git-send-email-alain.volmat@foss.st.com>
[-- Attachment #1: Type: text/plain, Size: 768 bytes --]
On Wed, Jun 30, 2021 at 04:11:43PM +0200, Alain Volmat wrote:
> Slave interrupt handler should only be called if there is actually
> a slave registered and running to avoid accessing an invalid pointer.
>
> Without this commit, an OOPS can be generated due to a NULL ptr dereference
> while receiving an IT when there is no master transfer and no slave
> running:
> - stm32f7_i2c_isr_event
> - no master_mode hence calling stm32f7_i2c_slave_isr_event
> - access to i2c_dev->slave_running leading to oops due to
> slave_running being NULL.
>
> Fixes: 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support")
>
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Is this one still of interest? You resent patches 1 and 2 but not this
one?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@kernel.org>
To: Alain Volmat <alain.volmat@foss.st.com>
Cc: pierre-yves.mordret@foss.st.com, alexandre.torgue@foss.st.com,
linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, fabrice.gasnier@foss.st.com,
amelie.delaunay@foss.st.com
Subject: Re: [PATCH 3/3] i2c: stm32f7: prevent calling slave handling if no slave running
Date: Mon, 29 Nov 2021 13:21:05 +0100 [thread overview]
Message-ID: <YaTFsV0sIU6BA0ja@kunai> (raw)
In-Reply-To: <1625062303-15327-4-git-send-email-alain.volmat@foss.st.com>
[-- Attachment #1.1: Type: text/plain, Size: 768 bytes --]
On Wed, Jun 30, 2021 at 04:11:43PM +0200, Alain Volmat wrote:
> Slave interrupt handler should only be called if there is actually
> a slave registered and running to avoid accessing an invalid pointer.
>
> Without this commit, an OOPS can be generated due to a NULL ptr dereference
> while receiving an IT when there is no master transfer and no slave
> running:
> - stm32f7_i2c_isr_event
> - no master_mode hence calling stm32f7_i2c_slave_isr_event
> - access to i2c_dev->slave_running leading to oops due to
> slave_running being NULL.
>
> Fixes: 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support")
>
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Is this one still of interest? You resent patches 1 and 2 but not this
one?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-11-29 13:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 14:11 [PATCH 0/3] i2c: stm32f7: several fixes in error cases Alain Volmat
2021-06-30 14:11 ` Alain Volmat
2021-06-30 14:11 ` [PATCH 1/3] i2c: stm32f7: recover the bus on access timeout Alain Volmat
2021-06-30 14:11 ` Alain Volmat
2021-06-30 14:11 ` [PATCH 2/3] i2c: stm32f7: flush TX FIFO upon transfer errors Alain Volmat
2021-06-30 14:11 ` Alain Volmat
2021-06-30 14:11 ` [PATCH 3/3] i2c: stm32f7: prevent calling slave handling if no slave running Alain Volmat
2021-06-30 14:11 ` Alain Volmat
2021-11-29 12:21 ` Wolfram Sang [this message]
2021-11-29 12:21 ` Wolfram Sang
2021-11-29 12:25 ` Alain Volmat
2021-11-29 12:25 ` Alain Volmat
2021-07-01 8:51 ` [PATCH 0/3] i2c: stm32f7: several fixes in error cases Alain Volmat
2021-07-01 8:51 ` Alain Volmat
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=YaTFsV0sIU6BA0ja@kunai \
--to=wsa@kernel.org \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=pierre-yves.mordret@foss.st.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.