From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703Ab2GIWY7 (ORCPT ); Mon, 9 Jul 2012 18:24:59 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:59817 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754610Ab2GIWY4 (ORCPT ); Mon, 9 Jul 2012 18:24:56 -0400 Date: Mon, 09 Jul 2012 15:24:55 -0700 (PDT) Message-Id: <20120709.152455.950070482948785087.davem@davemloft.net> To: Julia.Lawall@lip6.fr Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/7] net/rxrpc/ar-peer.c: remove invalid reference to list iterator variable From: David Miller In-Reply-To: <1341747464-1772-3-git-send-email-Julia.Lawall@lip6.fr> References: <1341747464-1772-1-git-send-email-Julia.Lawall@lip6.fr> <1341747464-1772-3-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: Mew version 6.5 on Emacs 24.0.97 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julia Lawall Date: Sun, 8 Jul 2012 13:37:39 +0200 > From: Julia Lawall > > If list_for_each_entry, etc complete a traversal of the list, the iterator > variable ends up pointing to an address at an offset from the list head, > and not a meaningful structure. Thus this value should not be used after > the end of the iterator. This seems to be a copy-paste bug from a previous > debugging message, and so the meaningless value is just deleted. > > This problem was found using Coccinelle (http://coccinelle.lip6.fr/). > > Signed-off-by: Julia Lawall Applied.