[dpdk-dev] [PATCH] ivshmem: avoid infinite loop when concatenating adjacent segments

Burakov, Anatoly anatoly.burakov at intel.com
Fri Apr 1 16:46:19 CEST 2016


> Please Anatoly,
> What do you think of this patch?
> 
> 2015-12-19 23:39, David Verbeiren:
> > This patch aligns the logic used to check for the presence of adjacent
> > segments in has_adjacent_segments() with the logic used in
> > cleanup_segments() when actually deciding to concatenate or not a pair
> > of segments.
> >
> > This fixes an infinite loop that happened when segments where adjacent
> > in their physical or virtual addresses but not in their ioremap
> > addresses: has_adjacent_segments() reported the presence of adjacent
> > segments while cleanup_segments() was not considering them for
> > concatenation, resulting in an infinite loop since the result of
> > has_adjacent_segments() is used in the decision to continue looping in
> > cleanup_segments().
> >
> > Signed-off-by: David Verbeiren <david.verbeiren at intel.com>

Yes, looking back on this, it made no sense. Or rather it did make some twisted sense, but led to a bug. So,

Acked-by: Anatoly  Burakov <anatoly.burakov at intel.com>





More information about the dev mailing list