From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Ido Schimmel <idosch@idosch.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Jiri Pirko <jiri@mellanox.com>,
Ido Schimmel <idosch@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy()
Date: Thu, 30 Jul 2020 08:30:20 -0500 [thread overview]
Message-ID: <2a37db2e-3e58-efd8-ffbd-0f318927e59e@embeddedor.com> (raw)
In-Reply-To: <20200730092153.GA2182419@shredder>
On 7/30/20 04:21, Ido Schimmel wrote:
> On Wed, Jul 29, 2020 at 05:58:03PM -0500, Gustavo A. R. Silva wrote:
>> Make use of the flex_array_size() helper to calculate the size of a
>> flexible array member within an enclosing structure.
>>
>> This helper offers defense-in-depth against potential integer
>> overflows, while at the same time makes it explicitly clear that
>> we are dealing witha flexible array member.
>>
>> Also, remove unnecessary pointer identifier sub_pool.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
>
> Reviewed-by: Ido Schimmel <idosch@mellanox.com>
> Tested-by: Ido Schimmel <idosch@mellanox.com>
>
Thanks, Ido.
--
Gustavo
next prev parent reply other threads:[~2020-07-30 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-29 22:58 [PATCH][next] mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy() Gustavo A. R. Silva
2020-07-30 9:21 ` Ido Schimmel
2020-07-30 13:30 ` Gustavo A. R. Silva [this message]
2020-07-31 0:39 ` David Miller
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=2a37db2e-3e58-efd8-ffbd-0f318927e59e@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=davem@davemloft.net \
--cc=gustavoars@kernel.org \
--cc=idosch@idosch.org \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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