summaryrefslogtreecommitdiffstats
path: root/drivers/net/rrunner.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-01-02 05:08:46 +0100
committerDavid S. Miller <davem@davemloft.net>2010-01-04 07:06:15 +0100
commit2585e7e5e1fcf64fd2b2cac0bc1f1b609eabe96a (patch)
tree7727b3e12099ae4570068b983f671c9683bf0656 /drivers/net/rrunner.c
parentbroadcom: Fix &&/|| confusion in bcm54xx_adjust_rxrefclk() (diff)
downloadlinux-2585e7e5e1fcf64fd2b2cac0bc1f1b609eabe96a.tar.xz
linux-2585e7e5e1fcf64fd2b2cac0bc1f1b609eabe96a.zip
rrunner: fix buffer overflow
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/rrunner.c')
-rw-r--r--drivers/net/rrunner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c
index 20a71749154a..1c257098d0a6 100644
--- a/drivers/net/rrunner.c
+++ b/drivers/net/rrunner.c
@@ -1293,7 +1293,7 @@ static void rr_dump(struct net_device *dev)
printk("Error code 0x%x\n", readl(&regs->Fail1));
- index = (((readl(&regs->EvtPrd) >> 8) & 0xff ) - 1) % EVT_RING_ENTRIES;
+ index = (((readl(&regs->EvtPrd) >> 8) & 0xff) - 1) % TX_RING_ENTRIES;
cons = rrpriv->dirty_tx;
printk("TX ring index %i, TX consumer %i\n",
index, cons);