rpms/kernel/F-9 linux-2.6-tun-kmap-atomic.patch, NONE, 1.1.2.1 kernel.spec, 1.648.2.2, 1.648.2.3

Mark McLoughlin (markmc) fedora-extras-commits at redhat.com
Thu May 29 10:36:27 UTC 2008


Author: markmc

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16856

Modified Files:
      Tag: private-markmc-virtio-gso-branch
	kernel.spec 
Added Files:
      Tag: private-markmc-virtio-gso-branch
	linux-2.6-tun-kmap-atomic.patch 
Log Message:
* Thu May 29 2008 Mark McLoughlin <markmc at redhat.com> - 2.6.25.4-29.3.virtio_gso
- tun: fix oops caused by sleeping after kmap_atomic()


linux-2.6-tun-kmap-atomic.patch:

--- NEW FILE linux-2.6-tun-kmap-atomic.patch ---
>From 3990db334181cbe5a78c5a5e08a05925b7756525 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Thu, 29 May 2008 10:52:54 +0100
Subject: [PATCH 1/1] tun: Do not use kmap_atomic() since memcpy_fromiovec() can sleep

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 drivers/net/tun.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 151b409..aff338e 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -322,9 +322,9 @@ static int get_user_skb_frags(struct iovec *iv, size_t count,
 			if (copy > len)
 				copy = len;
 
-			virt = kmap_atomic(f->page, KM_USER0);
+			virt = kmap(f->page);
 			err = memcpy_fromiovec(virt + f->size, iv, copy);
-			kunmap_atomic(virt, KM_USER0);
+			kunmap(f->page);
 
 			if (err)
 				return err;
-- 
1.5.4.1



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.648.2.2
retrieving revision 1.648.2.3
diff -u -r1.648.2.2 -r1.648.2.3
--- kernel.spec	26 May 2008 13:27:49 -0000	1.648.2.2
+++ kernel.spec	29 May 2008 10:35:33 -0000	1.648.2.3
@@ -649,6 +649,7 @@
 Patch1610: linux-2.6-tun-fix-trivial-coding-style-issue.patch
 Patch1611: linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch
 Patch1612: linux-2.6-tun-fix-skb-csum-start-computation.patch
+Patch1613: linux-2.6-tun-kmap-atomic.patch
 
 # nouveau + drm fixes
 Patch1801: linux-2.6-drm-git-mm.patch
@@ -1226,6 +1227,7 @@
 ApplyPatch linux-2.6-tun-fix-trivial-coding-style-issue.patch
 ApplyPatch linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch
 ApplyPatch linux-2.6-tun-fix-skb-csum-start-computation.patch
+ApplyPatch linux-2.6-tun-kmap-atomic.patch
 
 ApplyPatch linux-2.6-e1000-ich9.patch
 
@@ -1858,6 +1860,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Thu May 29 2008 Mark McLoughlin <markmc at redhat.com> - 2.6.25.4-29.3.virtio_gso
+- tun: fix oops caused by sleeping after kmap_atomic()
+
 * Mon May 26 2008 Mark McLoughlin <markmc at redhat.com> - 2.6.25.4-29.2.virtio_gso
 - virtio_net/tun: misc csum/GSO patches
 




More information about the fedora-extras-commits mailing list