From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
linux-i2c@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Cc: Waiman Long <longman@redhat.com>,
linux-rt-devel@lists.linux.dev,
Andi Shyti <andi.shyti@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>
Subject: Re: [BUG] exynos5_i2c_xfer_atomic() can sleep.
Date: Fri, 8 May 2026 11:45:15 +0200 [thread overview]
Message-ID: <03c06142-12eb-45b7-8d22-ce12fab6e132@samsung.com> (raw)
In-Reply-To: <20260506065110.sY3jKS7G@linutronix.de>
On 06.05.2026 08:51, Sebastian Andrzej Siewior wrote:
> While looking into the xfer_atomic i2c thingy, I've been looking at the
> exynos5_i2c_xfer_atomic() function and noticed that it has a
> disable_irq() invocation. Given that i2c_algorithm::xfer_atomic is
> called from atomic context (with either preemption or interrupts
> disabled) the might_sleep() in disable_irq() must lead to splat here.
Its me, who added that code, commit 445094c8a9fb1. I've tested that in the reboot/shutdown path and I'm quite sure that I've copied that irq_disable/enable from some other driver. I also cannot locate that might_sleep() in disable_irq(), where exactly it is?
> This looks very light tested because exynos5_i2c_poll_irqs_timeout()
> which should be invoked from atomic context has usleep_range(). This
> will schedule from atomic context is not good. I *think* this gets back
> with enabled interrupts.
Indeed this should be replaced with udelay.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2026-05-08 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260506065541eucas1p2f986355d0a06ac1f72aa00e8d3148ad0@eucas1p2.samsung.com>
2026-05-06 6:51 ` [BUG] exynos5_i2c_xfer_atomic() can sleep Sebastian Andrzej Siewior
2026-05-08 9:45 ` Marek Szyprowski [this message]
2026-05-08 10:09 ` Sebastian Andrzej Siewior
2026-05-08 10:35 ` Marek Szyprowski
2026-05-08 10:42 ` Sebastian Andrzej Siewior
2026-05-08 15:28 ` Marek Szyprowski
2026-05-08 15:52 ` Sebastian Andrzej Siewior
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=03c06142-12eb-45b7-8d22-ce12fab6e132@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=andi.shyti@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=krzk@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=longman@redhat.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