public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Tam Nguyen <tamnguyenchi@os.amperecomputing.com>,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org
Cc: patches@amperecomputing.com, andriy.shevchenko@linux.intel.com,
	mika.westerberg@linux.intel.com, jsd@semihalf.com,
	chuong@os.amperecomputing.com, darren@os.amperecomputing.com,
	Quan Nguyen <quan@os.amperecomputing.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] i2c: designware: Correct length byte validation logic
Date: Thu, 27 Jul 2023 13:36:47 +0300	[thread overview]
Message-ID: <afacba7f-c836-9d0c-3ffa-2b1cf3d4bdaa@linux.intel.com> (raw)
In-Reply-To: <20230726080001.337353-2-tamnguyenchi@os.amperecomputing.com>

On 7/26/23 11:00, Tam Nguyen wrote:
> From: Quan Nguyen <quan@os.amperecomputing.com>
> 
> Commit 0daede80f870 ("i2c: designware: Convert driver to using regmap API")
> changes the logic to validate the whole 32-bit return value of
> DW_IC_DATA_CMD register instead of 8-bit LSB without reason.
> 
> Later, commit f53f15ba5a85 ("i2c: designware: Get right data length"),
> introduced partial fix but not enough because the "tmp > 0" still test
> tmp as 32-bit value and is wrong in case the IC_DATA_CMD[11] is set.
> 
> Revert the logic to just before commit 0daede80f870
> ("i2c: designware: Convert driver to using regmap API").
> 
> Fixes: f53f15ba5a85 ("i2c: designware: Get right data length")
> Fixes: 0daede80f870 ("i2c: designware: Convert driver to using regmap API")
> Cc: stable@vger.kernel.org
> Signed-off-by: Tam Nguyen <tamnguyenchi@os.amperecomputing.com>
> Signed-off-by: Quan Nguyen <quan@os.amperecomputing.com>
> ---
>   drivers/i2c/busses/i2c-designware-master.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

  reply	other threads:[~2023-07-27 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230726080001.337353-1-tamnguyenchi@os.amperecomputing.com>
2023-07-26  8:00 ` [PATCH v2 1/2] i2c: designware: Correct length byte validation logic Tam Nguyen
2023-07-27 10:36   ` Jarkko Nikula [this message]
2023-08-14 13:29   ` Wolfram Sang
2023-07-26  8:00 ` [PATCH v2 2/2] i2c: designware: Handle invalid SMBus block data response length value Tam Nguyen
2023-07-27 10:49   ` Jarkko Nikula
2023-08-14 13:29   ` Wolfram Sang

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=afacba7f-c836-9d0c-3ffa-2b1cf3d4bdaa@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=chuong@os.amperecomputing.com \
    --cc=darren@os.amperecomputing.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=patches@amperecomputing.com \
    --cc=quan@os.amperecomputing.com \
    --cc=stable@vger.kernel.org \
    --cc=tamnguyenchi@os.amperecomputing.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