diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-03-20 18:58:02 +0100 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-03-20 18:58:02 +0100 |
commit | 1a02e59a2970f9ed28ab51d3b08624b79e54d848 (patch) | |
tree | 470cce472be3b08c160e0c569648e7228651b12a /drivers/net/tun.c | |
parent | ppc32: Fix BCSR_SIZE for MPC834x SYS (diff) | |
parent | [PATCH] powerpc: Fix bug in bug fix for bug in lmb_alloc() (diff) | |
download | linux-1a02e59a2970f9ed28ab51d3b08624b79e54d848.tar.xz linux-1a02e59a2970f9ed28ab51d3b08624b79e54d848.zip |
Merge branch 'master'
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 50b8c6754b1e..a1ed2d983740 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) { |