arm64: mte: Prevent restoring tags multiple times
Previously it was possible for tags to be restored after swap multiple
times. Rework the code so that tags are only restored if the page
doesn't already have the PG_mte_tagged flag on it.
mte_restore_tags() now doesn't set the flag, and returns whether the
page had tags, so arch_swap_restore_tags() also needs updating to
conditionally set the flag.
Signed-off-by:
Steven Price <steven.price@arm.com>
Loading
Please register or sign in to comment