Re: [dpdk-dev] [PATCH] memalloc: fix potential underflow on mem size calculation

2018-05-13 Thread Thomas Monjalon
03/05/2018 15:03, Anatoly Burakov: > If total memory is already bigger than max memory, an underflow > will occur on subtraction. Fix it by simply stopping whenever > we already have amount of memory that is bigger than maximum. > > Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") > C

[dpdk-dev] [PATCH] memalloc: fix potential underflow on mem size calculation

2018-05-03 Thread Anatoly Burakov
If total memory is already bigger than max memory, an underflow will occur on subtraction. Fix it by simply stopping whenever we already have amount of memory that is bigger than maximum. Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Cc: anatoly.bura...@intel.com Signed-off-by: An