[dpdk-dev] [PATCH v3] vhost: fix mmap failure as len not aligned with hugepage size
Thomas Monjalon
thomas.monjalon at 6wind.com
Tue Nov 24 19:24:40 CET 2015
2015-11-12 14:06, Jianfeng Tan:
> This patch fixes a bug under lower version linux kernel, mmap()
> fails when length is not aligned with hugepage size. mmap()
> without flag of MAP_ANONYMOUS, should be called with length
> argument aligned with hugepagesz at older longterm version
> Linux, like 2.6.32 and 3.2.72, or mmap() will fail with EINVAL.
> This bug was fixed in Linux kernel by commit:
> dab2d3dc45ae7343216635d981d43637e1cb7d45
> To avoid failure, make sure in caller to keep length aligned.
>
> v3 changes:
> - fix (u64) -> (void *) convert error on 32-bit system
>
> v2 changes:
> - add Kernel version comments and commit msg
> - remove unnecessary alignments when munmap
>
> Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>
You forgot to keep Huawei's ack from v2.
Applied, thanks
More information about the dev
mailing list