| Submitter | Florian Westphal |
|---|---|
| Date | May 21, 2009, 9:59 p.m. |
| Message ID | <20090521215915.GA32737@Chamillionaire.breakpoint.cc> |
| Download | mbox | patch |
| Permalink | /patch/27508/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
From: Florian Westphal <fw@strlen.de> Date: Thu, 21 May 2009 23:59:15 +0200 > pktgen: do not access flows[] beyond its length > > typo -- pkt_dev->nflows is for stats only, the number of concurrent > flows is stored in cflows. > > Reported-By: Vladimir Ivashchenko <hazard@francoudi.com> > Signed-off-by: Florian Westphal <fw@strlen.de> Applied and queued up for -stable, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 3779c14..8445075 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2447,7 +2447,7 @@ static inline void free_SAs(struct pktgen_dev *pkt_dev) 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);