From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 607CE2B9D for ; Fri, 22 Jul 2016 16:56:29 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id o80so70266534wme.1 for ; Fri, 22 Jul 2016 07:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=+B/94KjoXE3nlRy0Z+klWl81rv7FJNGtKBEBSxTNtes=; b=nD7Nu7UUoX+xgrD+5pc+gSFTCr0rGmJx/QLt5QcZsfwYbRnr3qTTOISSsndSsOJi+p Pmw4HHo9jrCk3BYVHE5jyd9EX3FPtWXtccEKM0Ml0Pm45tth1VEGg2ubntJdleFqkfE3 7Jm2Ef08iN2X7IIEorEAiz21t7OTL6o4YyWryNEEt95c+s00AQzOU78TOmSXXOuGcPoZ BKHQ752tICf45LEtDyE0cb1YtKHCS8xSNp9g2Cdwy673gheNcxULYhuiHzMrUxmdugrX ZvdmFv2UtBk0XLBoq1zxauiQfFYQ7+NkI6Leaf7b7yPDi4NCpjrYSEh9qj9LKXhjSW55 qFEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=+B/94KjoXE3nlRy0Z+klWl81rv7FJNGtKBEBSxTNtes=; b=hVTE18BuD0hHvzQCAad5qna0IJ9A3hl3bH6JkkfyNpIs1Lyy3Pc9rPJziKAY28LwfK dk+VIMWlO6kHzbdBic24OPTtUql/wKfma87ex7JK1xxQjN5aO3ukXUuVTAFEWu88QmVQ lGGL4GKaQHqmzxZPavQmHKx2JQ5wW+MkNPcOwiXIFGHPSdfXZqhLDdLQM6NT77Uju9RG Kp7XfLYUyiPbZJtga2Q8EsVf0I+kfLLA1WSGjRJ1lpDV6cmhResXxUAUjTpa5Xav8a5D 5xGzZmZSTCHaxBMJbcIaAPgjQm2Vq5HUnxvE2Omp0B7IzIVNmqbhTB7bBBR8QM2k9Ye6 jjHg== X-Gm-Message-State: AEkoouvSPZ0JSXxhuiZ7z+sjHAJTIw6UZf0aviTgzXWour17DWgxURoNGAFFGkoK3i+Z8C/0 X-Received: by 10.194.103.3 with SMTP id fs3mr1364792wjb.115.1469199389133; Fri, 22 Jul 2016 07:56:29 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id n131sm9898032wmd.3.2016.07.22.07.56.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jul 2016 07:56:27 -0700 (PDT) From: Thomas Monjalon To: Pablo de Lara Cc: dev@dpdk.org, helin.zhang@intel.com, sergio.gonzalez.monroy@intel.com Date: Fri, 22 Jul 2016 16:56:26 +0200 Message-ID: <20431323.66BXPug8Lb@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1469196122-168989-3-git-send-email-pablo.de.lara.guarch@intel.com> References: <1469192923-168564-1-git-send-email-pablo.de.lara.guarch@intel.com> <1469196122-168989-1-git-send-email-pablo.de.lara.guarch@intel.com> <1469196122-168989-3-git-send-email-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix unsafe tailq element removal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2016 14:56:29 -0000 2016-07-22 15:02, Pablo de Lara: > i40e driver was removing elements when iterating tailq lists > with TAILQ_FOREACH macro, which is not safe. > Instead, TAILQ_FOREACH_SAFE macro is used when removing/freeing > these elements. Pablo, Maybe we should add a note to explain that the bug of freeing while iterating is seen since the memory is zeroed on free: ea0bddbd14e6 ("mem: zero out memory on free")