* [patch] rrunner: fix buffer overflow
@ 2010-01-02 14:08 Dan Carpenter
2010-01-04 6:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-01-02 14:08 UTC (permalink / raw)
To: netdev; +Cc: davem
tx_skbuff is define as:
struct sk_buff *tx_skbuff[TX_RING_ENTRIES];
EVT_RING_ENTRIES is 64 and TX_RING_ENTRIES is 32.
This function is in a error path so that's why it wasn't noticed.
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/drivers/net/rrunner.c 2010-01-02 09:25:56.000000000 +0200
+++ devel/drivers/net/rrunner.c 2010-01-02 09:35:13.000000000 +0200
@@ -1293,7 +1293,7 @@ static void rr_dump(struct net_device *d
printk("Error code 0x%x\n", readl(®s->Fail1));
- index = (((readl(®s->EvtPrd) >> 8) & 0xff ) - 1) % EVT_RING_ENTRIES;
+ index = (((readl(®s->EvtPrd) >> 8) & 0xff) - 1) % TX_RING_ENTRIES;
cons = rrpriv->dirty_tx;
printk("TX ring index %i, TX consumer %i\n",
index, cons);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] rrunner: fix buffer overflow
2010-01-02 14:08 [patch] rrunner: fix buffer overflow Dan Carpenter
@ 2010-01-04 6:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-01-04 6:06 UTC (permalink / raw)
To: error27; +Cc: netdev
From: Dan Carpenter <error27@gmail.com>
Date: Sat, 2 Jan 2010 16:08:46 +0200
> tx_skbuff is define as:
> struct sk_buff *tx_skbuff[TX_RING_ENTRIES];
>
> EVT_RING_ENTRIES is 64 and TX_RING_ENTRIES is 32.
>
> This function is in a error path so that's why it wasn't noticed.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-04 6:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-02 14:08 [patch] rrunner: fix buffer overflow Dan Carpenter
2010-01-04 6:06 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).