From: Ido Schimmel <idosch@idosch.org>
To: "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 12:21:53 +0300 [thread overview]
Message-ID: <20200730092153.GA2182419@shredder> (raw)
In-Reply-To: <20200729225803.GA15866@embeddedor>
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
next prev parent reply other threads:[~2020-07-30 9:22 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 [this message]
2020-07-30 13:30 ` Gustavo A. R. Silva
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=20200730092153.GA2182419@shredder \
--to=idosch@idosch.org \
--cc=davem@davemloft.net \
--cc=gustavoars@kernel.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 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.