diff options
author | Colin Ian King <[email protected]> | 2018-12-18 17:29:56 +0000 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2018-12-19 00:00:16 +0100 |
commit | 32043fa065b51e0b1433e48d118821c71b5cd65d (patch) | |
tree | 094fdcdbc7efd6d5eca4287755face6de178256c /tools/perf/scripts/python | |
parent | 87ab4689ca6526079ab6f5150219ee88b42000ae (diff) |
x86/mtrr: Don't copy uninitialized gentry fields back to userspace
Currently the copy_to_user of data in the gentry struct is copying
uninitiaized data in field _pad from the stack to userspace.
Fix this by explicitly memset'ing gentry to zero, this also will zero any
compiler added padding fields that may be in struct (currently there are
none).
Detected by CoverityScan, CID#200783 ("Uninitialized scalar variable")
Fixes: b263b31e8ad6 ("x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Tyler Hicks <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions