diff options
| author | Gustavo A. R. Silva <[email protected]> | 2020-10-13 16:52:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-10-13 18:38:30 -0700 |
| commit | e90342e6d26ab6d1c38c8f5804492d76e3e9b4e9 (patch) | |
| tree | a6ea984e58348fa5e45ba533338929aa06115d59 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 433e7d3177544c8cf0b6375abd310b0ef023fe9d (diff) | |
mm: memcontrol: use flex_array_size() helper in memcpy()
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 with
a flexible array member.
Also, remove unnecessary braces.
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Link: https://lkml.kernel.org/r/ddd60dae2d9aea1ccdd2be66634815c93696125e.1596214831.git.gustavoars@kernel.org
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions