Commit ff24854e authored by Helge Deller's avatar Helge Deller Committed by Greg Kroah-Hartman
Browse files

apparmor: Fix unaligned memory accesses in KUnit test



[ Upstream commit c6880419 ]

The testcase triggers some unnecessary unaligned memory accesses on the
parisc architecture:
  Kernel: unaligned access to 0x12f28e27 in policy_unpack_test_init+0x180/0x374 (iir 0x0cdc1280)
  Kernel: unaligned access to 0x12f28e67 in policy_unpack_test_init+0x270/0x374 (iir 0x64dc00ce)

Use the existing helper functions put_unaligned_le32() and
put_unaligned_le16() to avoid such warnings on architectures which
prefer aligned memory accesses.

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Fixes: 98c0cc48 ("apparmor: fix policy_unpack_test on big endian systems")
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 277bb68f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment