Commit 582fcc37 authored by Barry Song's avatar Barry Song Committed by Jie Liu
Browse files

dma-mapping: benchmark: use u8 for reserved field in uAPI structure

mainline inclusion
commit id 9f5f8ec5
from mainline-v5.11-rc7
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I60AX5
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9f5f8ec50165630cfc49897410b30997d4d677b5



----------------------------------------------------------------------

The original code put five u32 before a u64 expansion[10] array. Five is
odd, this will cause trouble in the extension of the structure by adding
new features. This patch moves to use u8 for reserved field to avoid
future alignment risk.
Meanwhile, it also clears the memory of struct map_benchmark in tools,
otherwise, if users use old version to run on newer kernel, the random
expansion value will cause side effect on newer kernel.

Signed-off-by: default avatarBarry Song <song.bao.hua@hisilicon.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJie Liu <liujie375@h-partners.com>
parent 2a1c9632
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment