aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
diff options
context:
space:
mode:
authorFrank Rowand <[email protected]>2021-04-08 20:45:08 +0000
committerRob Herring <[email protected]>2021-04-08 21:38:47 +0000
commit48d499bd89191b359a6dbe44d32107e3021571c2 (patch)
tree2fa58efa7eeb0a6367f6efbcd4b5f4438a1fdfc0 /drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
parentof: properly check for error returned by fdt_get_name() (diff)
downloadkernel-48d499bd89191b359a6dbe44d32107e3021571c2.tar.gz
kernel-48d499bd89191b359a6dbe44d32107e3021571c2.zip
of: unittest: overlay: ensure proper alignment of copied FDT
The Devicetree standard specifies an 8 byte alignment of the FDT. Code in libfdt expects this alignment for an FDT image in memory. kmemdup() returns 4 byte alignment on openrisc. Replace kmemdup() with kmalloc(), align pointer, memcpy() to get proper alignment. The 4 byte alignment exposed a related bug which triggered a crash on openrisc with: commit 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9") as reported in: https://lore.kernel.org/lkml/[email protected]/ Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Frank Rowand <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_test.c')
0 files changed, 0 insertions, 0 deletions