diff options
| author | Paul Burton <[email protected]> | 2016-09-23 16:38:27 +0100 |
|---|---|---|
| committer | Ralf Baechle <[email protected]> | 2017-01-03 16:34:48 +0100 |
| commit | de96ec2a77c6d06a423c2c495bb4a2f4299f3d9e (patch) | |
| tree | e56858634ec3b7e00fd0050fc084d3708b113f10 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 5c01918068ecc673dcea265e71ad95f949f28e2d (diff) | |
OF: Prevent unaligned access in of_alias_scan()
When allocating a struct alias_prop, of_alias_scan() only requested that
it be aligned on a 4 byte boundary. The struct contains pointers which
leads to us attempting 64 bit writes on 64 bit systems, and if the CPU
doesn't support unaligned memory accesses then this causes problems -
for example on some MIPS64r2 CPUs including the "mips64r2-generic" QEMU
emulated CPU it will trigger an address error exception.
Fix this by requesting alignment for the struct alias_prop allocation
matching that which the compiler expects, using the __alignof__ keyword.
Signed-off-by: Paul Burton <[email protected]>
Acked-by: Rob Herring <[email protected]>
Reviewed-by: Grant Likely <[email protected]>
Cc: Frank Rowand <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/14306/
Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions