From: Wolfram Sang <wsa@kernel.org>
To: Rand Deeb <rand.sec96@gmail.com>
Cc: Avi Fishman <avifishman70@gmail.com>,
Tomer Maimon <tmaimon77@gmail.com>,
Tali Perry <tali.perry1@gmail.com>,
Patrick Venture <venture@google.com>,
Nancy Yuen <yuenn@google.com>,
Benjamin Fair <benjaminfair@google.com>,
openbmc@lists.ozlabs.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, deeb.rand@confident.ru,
lvc-project@linuxtesting.org,
voskresenski.stanislav@confident.ru
Subject: Re: [PATCH] i2c: Remove redundant comparison in npcm_i2c_reg_slave
Date: Tue, 6 Feb 2024 20:52:06 +0100 [thread overview]
Message-ID: <ZcKN5isE0B6q88Fa@shikoro> (raw)
In-Reply-To: <20240206194201.10054-1-rand.sec96@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 619 bytes --]
On Tue, Feb 06, 2024 at 10:42:01PM +0300, Rand Deeb wrote:
> In the npcm_i2c_reg_slave() function, there was a redundant
> comparison that checked if 'bus->slave' was null immediately after
> assigning it the 'client' value. There were concerns about a
> potential null dereference because of `client->adapter`, but
> according to Wolfram Sang, "we trusted ourselves here" Therefore,
> this comparison is unnecessary.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- 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: Rand Deeb <rand.sec96@gmail.com>
Cc: lvc-project@linuxtesting.org,
voskresenski.stanislav@confident.ru,
Benjamin Fair <benjaminfair@google.com>,
Avi Fishman <avifishman70@gmail.com>,
Patrick Venture <venture@google.com>,
openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Tali Perry <tali.perry1@gmail.com>,
linux-i2c@vger.kernel.org, deeb.rand@confident.ru,
Tomer Maimon <tmaimon77@gmail.com>
Subject: Re: [PATCH] i2c: Remove redundant comparison in npcm_i2c_reg_slave
Date: Tue, 6 Feb 2024 20:52:06 +0100 [thread overview]
Message-ID: <ZcKN5isE0B6q88Fa@shikoro> (raw)
In-Reply-To: <20240206194201.10054-1-rand.sec96@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 619 bytes --]
On Tue, Feb 06, 2024 at 10:42:01PM +0300, Rand Deeb wrote:
> In the npcm_i2c_reg_slave() function, there was a redundant
> comparison that checked if 'bus->slave' was null immediately after
> assigning it the 'client' value. There were concerns about a
> potential null dereference because of `client->adapter`, but
> according to Wolfram Sang, "we trusted ourselves here" Therefore,
> this comparison is unnecessary.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-02-06 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 19:42 [PATCH] i2c: Remove redundant comparison in npcm_i2c_reg_slave Rand Deeb
2024-02-06 19:42 ` Rand Deeb
2024-02-06 19:52 ` Wolfram Sang [this message]
2024-02-06 19:52 ` Wolfram Sang
2024-02-14 22:25 ` Andi Shyti
2024-02-14 22:25 ` Andi Shyti
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=ZcKN5isE0B6q88Fa@shikoro \
--to=wsa@kernel.org \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=deeb.rand@confident.ru \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=openbmc@lists.ozlabs.org \
--cc=rand.sec96@gmail.com \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=venture@google.com \
--cc=voskresenski.stanislav@confident.ru \
--cc=yuenn@google.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.