From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756204AbZFJDhR (ORCPT ); Tue, 9 Jun 2009 23:37:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755049AbZFJDeE (ORCPT ); Tue, 9 Jun 2009 23:34:04 -0400 Received: from kroah.org ([198.145.64.141]:56732 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755823AbZFJDeC (ORCPT ); Tue, 9 Jun 2009 23:34:02 -0400 X-Mailbox-Line: From greg@blue.kroah.org Tue Jun 9 17:23:43 2009 Message-Id: <20090610002342.886947553@blue.kroah.org> User-Agent: quilt/0.48-1 Date: Tue, 09 Jun 2009 17:13:42 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Florian Westphal , "David S. Miller" , Greg Kroah-Hartman Subject: [patch 14/60] pktgen: do not access flows[] beyond its length References: <20090610001328.251476848@blue.kroah.org> Content-Disposition: inline; filename=pktgen-do-not-access-flows-beyond-its-length.patch In-Reply-To: <20090610032135.GA19346@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org -stable review patch. If anyone has any objections, please let us know. ------------------ From: Florian Westphal [ Upstream commit 5b5f792a6a9a2f9ae812d151ed621f72e99b1725 ] typo -- pkt_dev->nflows is for stats only, the number of concurrent flows is stored in cflows. Reported-By: Vladimir Ivashchenko Signed-off-by: Florian Westphal Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/pktgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2449,7 +2449,7 @@ static inline void free_SAs(struct pktge if (pkt_dev->cflows) { /* let go of the SAs if we have them */ int i = 0; - for (; i < pkt_dev->nflows; i++){ + for (; i < pkt_dev->cflows; i++) { struct xfrm_state *x = pkt_dev->flows[i].x; if (x) { xfrm_state_put(x);