From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 2/2] net/i40e: fix unsafe tailq element removal Date: Fri, 22 Jul 2016 16:56:26 +0200 Message-ID: <20431323.66BXPug8Lb@xps13> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, helin.zhang@intel.com, sergio.gonzalez.monroy@intel.com To: Pablo de Lara 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) In-Reply-To: <1469196122-168989-3-git-send-email-pablo.de.lara.guarch@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" 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")