[dpdk-dev] [PATCH] linuxapp eal: set fd to -1 for MAP_ANONYMOUS cases

Thomas Monjalon thomas at monjalon.net
Mon Apr 2 18:50:12 CEST 2018


02/04/2018 14:06, Neil Horman:
> https://dpdk.org/tracker/show_bug.cgi?id=18

I really appreciate reading such bug request.
Maybe we should add a Suggested-by line
	Suggested-by: Solal Pirelli <solal.pirelli at gmail.com>
before the SoB line (chronological order).


> Indicated that several mmap call sites in the linuxapp eal code used an
> fd that was not -1 in their calls while using MAP_ANONYMOUS.  While
> probably not a huge deal, the man page does say the fd should be -1 for
> portability, as some implementations don't ignore fd as they should for
> MAP_ANONYMOUS, and seting -1 here allows us to eliminate some code.
> 
> Signed-off-by: Neil Horman <nhorman at tuxdriver.com>
> CC: Thomas Monjalon <thomas at monjalon.net>
> CC: Ferruh Yigit <ferruh.yigit at intel.com>





More information about the dev mailing list