From: Wolfram Sang <wsa@kernel.org>
To: Jean Delvare <jdelvare@suse.de>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH] i2c: i801: Don't generate an interrupt on bus reset
Date: Thu, 27 May 2021 21:56:56 +0200 [thread overview]
Message-ID: <YK/5iPNV5USqxE4G@kunai> (raw)
In-Reply-To: <20210525170336.213a19b4@endymion>
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
On Tue, May 25, 2021 at 05:03:36PM +0200, Jean Delvare wrote:
> Now that the i2c-i801 driver supports interrupts, setting the KILL bit
> in a attempt to recover from a timed out transaction triggers an
> interrupt. Unfortunately, the interrupt handler (i801_isr) is not
> prepared for this situation and will try to process the interrupt as
> if it was signaling the end of a successful transaction. In the case
> of a block transaction, this can result in an out-of-range memory
> access.
>
> This condition was reproduced several times by syzbot:
> https://syzkaller.appspot.com/bug?extid=ed71512d469895b5b34e
> https://syzkaller.appspot.com/bug?extid=8c8dedc0ba9e03f6c79e
> https://syzkaller.appspot.com/bug?extid=c8ff0b6d6c73d81b610e
> https://syzkaller.appspot.com/bug?extid=33f6c360821c399d69eb
> https://syzkaller.appspot.com/bug?extid=be15dc0b1933f04b043a
> https://syzkaller.appspot.com/bug?extid=b4d3fd1dfd53e90afd79
>
> So disable interrupts while trying to reset the bus. Interrupts will
> be enabled again for the following transaction.
>
> Fixes: 636752bcb517 ("i2c-i801: Enable IRQ for SMBus transactions")
> Reported-by: syzbot+b4d3fd1dfd53e90afd79@syzkaller.appspotmail.com
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-05-27 19:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 15:03 [PATCH] i2c: i801: Don't generate an interrupt on bus reset Jean Delvare
2021-05-26 9:10 ` Jarkko Nikula
2021-05-27 19:56 ` Wolfram Sang [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=YK/5iPNV5USqxE4G@kunai \
--to=wsa@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hkallweit1@gmail.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
/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).