Patchwork [3/3] tun: Limit amount of queued packets per device

login
register
mail settings
Submitter Herbert Xu
Date Feb. 15, 2009, 3:15 a.m.
Message ID <20090215031506.GA7749@gondor.apana.org.au>
Download mbox | patch
Permalink /patch/23192/
State Accepted
Delegated to: David Miller
Headers show

Comments

Herbert Xu - Feb. 15, 2009, 3:15 a.m.
On Thu, Feb 12, 2009 at 12:35:01PM -0700, Alex Williamson wrote:
> 
> Current net-next-2.6 (v2.6.29-rc2-1715-g367681f).  I just reverified it
> with kvm-userspace (kvm-83-389-ga1efe3d).  The problem goes away if I
> patch -R commit 33dccbb.

Sorry, my fault for not testing the merged result.

tun: Fix merge error

When forward-porting the tun accounting patch I managed to break
the send path compltely by dropping the tun_get call.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


Thanks,
David Miller - Feb. 15, 2009, 4:46 a.m.
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sun, 15 Feb 2009 11:15:06 +0800

> On Thu, Feb 12, 2009 at 12:35:01PM -0700, Alex Williamson wrote:
> > 
> > Current net-next-2.6 (v2.6.29-rc2-1715-g367681f).  I just reverified it
> > with kvm-userspace (kvm-83-389-ga1efe3d).  The problem goes away if I
> > patch -R commit 33dccbb.
> 
> Sorry, my fault for not testing the merged result.
> 
> tun: Fix merge error
> 
> When forward-porting the tun accounting patch I managed to break
> the send path compltely by dropping the tun_get call.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied, thanks Herbert.
--
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/drivers/net/tun.c b/drivers/net/tun.c
index 4825c52..a1b0697 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -660,7 +660,7 @@  static ssize_t tun_chr_aio_write(struct kiocb *iocb, const struct iovec *iv,
 			      unsigned long count, loff_t pos)
 {
 	struct file *file = iocb->ki_filp;
-	struct tun_struct *tun = file->private_data;
+	struct tun_struct *tun = tun_get(file);
 	ssize_t result;
 
 	if (!tun)