From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] ivshmem: avoid infinite loop when concatenating adjacent segments Date: Thu, 07 Apr 2016 19:18:21 +0200 Message-ID: <2694753.mMpTndY4fj@xps13> References: <1450564772-20000-1-git-send-email-david.verbeiren@intel.com> <1460026800-24159-1-git-send-email-anatoly.burakov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, david.verbeiren@intel.com To: Anatoly Burakov Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id C02772BD9 for ; Thu, 7 Apr 2016 19:18:23 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id n3so113757364wmn.0 for ; Thu, 07 Apr 2016 10:18:23 -0700 (PDT) In-Reply-To: <1460026800-24159-1-git-send-email-anatoly.burakov@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > 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. Additionally, adjacent segments are > no longer considered overlapping to avoid generating errors for > segments that can happily coexist together. > > 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 > Signed-off-by: Anatoly Burakov Applied, thanks