From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 2/2] mem: fix freeing an IVSHMEM memzone Date: Mon, 10 Aug 2015 15:40:07 +0200 Message-ID: <5563961.nNkN52hQJs@xps13> References: <1438961253-4011-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1438961253-4011-2-git-send-email-sergio.gonzalez.monroy@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Sergio Gonzalez Monroy Return-path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 3704C5A6F for ; Mon, 10 Aug 2015 15:41:21 +0200 (CEST) Received: by wibhh20 with SMTP id hh20so151344364wib.0 for ; Mon, 10 Aug 2015 06:41:21 -0700 (PDT) In-Reply-To: <1438961253-4011-2-git-send-email-sergio.gonzalez.monroy@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" 2015-08-07 16:27, Sergio Gonzalez Monroy: > There is no sync between host and guest to allow removal of memzones, > and freeing them result in undefined behavior. > > In the guest, we identify IVSHMEM memsegs/memzones by having > ioremap_addr != 0. In the host, nothing is done to the memzone, meaning > ioremap_addr == 0. > > As a solution, mark memzones being added to IVSHMEM in the host, by > setting ioremap_addr, then return an error whenever we try to free an > IVSHMEM memzone. > > Fixes: ff909fe21f0 ("mem: introduce memzone freeing") > > Signed-off-by: Sergio Gonzalez Monroy Series applied, thanks