From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] ivshmem: avoid infinite loop when concatenating adjacent segments Date: Fri, 01 Apr 2016 16:12:34 +0200 Message-ID: <3289545.8FCtugvDy0@xps13> References: <1450564772-20000-1-git-send-email-david.verbeiren@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, david.verbeiren@gmail.com To: Anatoly Burakov Return-path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 008D42BDD for ; Fri, 1 Apr 2016 16:14:30 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id f198so27878687wme.0 for ; Fri, 01 Apr 2016 07:14:29 -0700 (PDT) In-Reply-To: <1450564772-20000-1-git-send-email-david.verbeiren@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" 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