diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-03-15 17:02:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-03-15 17:02:08 -0500 |
commit | dd288e7d75b9041f79fecae77d61cfa345da7266 (patch) | |
tree | 85ff1d1ea0fe1d6eae0b6819422d5c6c05f862cd /drivers/net | |
parent | 30dcbf29cc6d92d70fa262e79e84011fe6913bed (diff) | |
parent | 72df16f109b73be37977a26d342e9103e8851cb6 (diff) |
Merge branch 'upstream-fixes'
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tg3.c | 2 | ||||
-rw-r--r-- | drivers/net/tun.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 0f3798f8188..c0878f304e5 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -10543,8 +10543,6 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) strcat(str, "66MHz"); else if (clock_ctrl == 6) strcat(str, "100MHz"); - else if (clock_ctrl == 7) - strcat(str, "133MHz"); } else { strcpy(str, "PCI:"); if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 50b8c6754b1..a1ed2d98374 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -249,8 +249,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, if (align) skb_reserve(skb, align); - if (memcpy_fromiovec(skb_put(skb, len), iv, len)) + if (memcpy_fromiovec(skb_put(skb, len), iv, len)) { + tun->stats.rx_dropped++; + kfree_skb(skb); return -EFAULT; + } skb->dev = tun->dev; switch (tun->flags & TUN_TYPE_MASK) { |