rpms/kernel/F-8 linux-2.6-net-tun-fix-rtnl-locking.patch, NONE, 1.1 kernel.spec, 1.418, 1.419

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Apr 3 02:56:26 UTC 2008


Author: cebbert

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

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-net-tun-fix-rtnl-locking.patch 
Log Message:
* Wed Apr 02 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-73
- Fix locking in tun/tap driver when device address changes (#439715)


linux-2.6-net-tun-fix-rtnl-locking.patch:

--- NEW FILE linux-2.6-net-tun-fix-rtnl-locking.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=401023710d73aaef1191ab4d6a79d39c51add828
Commit:     401023710d73aaef1191ab4d6a79d39c51add828
Parent:     459eea74104ad85c30e17541c2b30d776445e985
Author:     Kim B. Heino <Kim.Heino at bluegiga.com>
AuthorDate: Fri Feb 29 12:26:21 2008 -0800
Committer:  David S. Miller <davem at davemloft.net>
CommitDate: Fri Feb 29 12:26:21 2008 -0800

    [TUN]: Fix RTNL-locking in tun/tap driver
    
    Current tun/tap driver sets also net device's hw address when asked to
    change character device's hw address. This is a good idea, but it
    misses RTLN-locking, resulting following error message in 2.6.25-rc3's
    inetdev_event() function:
    
    RTNL: assertion failed at net/ipv4/devinet.c (1050)
    
    Attached patch fixes this problem.
    
    Signed-off-by: Kim B. Heino <Kim.Heino at bluegiga.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>
---
 drivers/net/tun.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 038c1ef..7b816a0 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -663,7 +663,11 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
 	case SIOCSIFHWADDR:
 	{
 		/* try to set the actual net device's hw address */
-		int ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr);
+		int ret;
+
+		rtnl_lock();
+		ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr);
+		rtnl_unlock();
 
 		if (ret == 0) {
 			/** Set the character device's hardware address. This is used when



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.418
retrieving revision 1.419
diff -u -r1.418 -r1.419
--- kernel.spec	3 Apr 2008 01:51:15 -0000	1.418
+++ kernel.spec	3 Apr 2008 02:55:37 -0000	1.419
@@ -644,6 +644,7 @@
 
 Patch430: linux-2.6-net-silence-noisy-printks.patch
 Patch431: linux-2.6-netfilter-really-fix-oops-in-nf_nat_move_storage.patch
+Patch432: linux-2.6-net-tun-fix-rtnl-locking.patch
 Patch440: linux-2.6-sha_alignment.patch
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch452: linux-2.6-input-appletouch-macbook3-trackpad.patch
@@ -1224,10 +1225,10 @@
 # Networking
 # Disable easy to trigger printk's.
 ApplyPatch linux-2.6-net-silence-noisy-printks.patch
-# fix oops in netfilter
-# ApplyPatch linux-2.6-netfilter-fix-null-deref-nf_nat_move_storage.patch
 # fix oops in netfilter again
 ApplyPatch linux-2.6-netfilter-really-fix-oops-in-nf_nat_move_storage.patch
+# fix rtnl locking on tun/tap device address change
+ApplyPatch linux-2.6-net-tun-fix-rtnl-locking.patch
 
 # Misc fixes
 # Fix SHA1 alignment problem on ia64
@@ -2008,6 +2009,9 @@
 
 
 %changelog
+* Wed Apr 02 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-73
+- Fix locking in tun/tap driver when device address changes (#439715)
+
 * Wed Apr 02 2008 Eric Sandeen <sandeen at redhat.com> 2.6.24.4-72
 - Fix mis-read of xfs attr2 superblock flag which was causing
   corruption in some cases. (#437968)




More information about the fedora-extras-commits mailing list