rpms/kernel/FC-6 linux-2.6-net-dst_entry-reorder-crash.patch, NONE, 1.1 linux-2.6-raid-autorun.patch, 1.2, 1.3 kernel-2.6.spec, 1.2999, 1.3000

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Aug 1 17:59:07 UTC 2007


Author: cebbert

Update of /cvs/dist/rpms/kernel/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv10809

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-net-dst_entry-reorder-crash.patch 
	linux-2.6-raid-autorun.patch 
Log Message:
* Wed Aug 01 2007 Chuck Ebbert <cebbert at redhat.com>
- fix crash in xfrm4
- restore md driver START_ARRAY ioctl


linux-2.6-net-dst_entry-reorder-crash.patch:
 include/net/xfrm.h     |    1 -
 net/xfrm/xfrm_policy.c |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE linux-2.6-net-dst_entry-reorder-crash.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd0bf0765ea1fba80d7085e1f0375ec045631dc1
Commit:     bd0bf0765ea1fba80d7085e1f0375ec045631dc1
Parent:     16751347a060a10c09b11593bb179fd5b0240c04
Author:     Patrick McHardy <kaber at trash.net>
AuthorDate: Wed Jul 18 01:55:52 2007 -0700
Committer:  David S. Miller <davem at davemloft.net>
CommitDate: Wed Jul 18 01:55:52 2007 -0700

    [XFRM]: Fix crash introduced by struct dst_entry reordering
    
    XFRM expects xfrm_dst->u.next to be same pointer as dst->next, which
    was broken by the dst_entry reordering in commit 1e19e02c~, causing
    an oops in xfrm_bundle_ok when walking the bundle upwards.
    
    Kill xfrm_dst->u.next and change the only user to use dst->next instead.
    
    Signed-off-by: Patrick McHardy <kaber at trash.net>
    Signed-off-by: David S. Miller <davem at davemloft.net>
---
 include/net/xfrm.h     |    1 -
 net/xfrm/xfrm_policy.c |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index ae959e9..a5f80bf 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -585,7 +585,6 @@ static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ct
 struct xfrm_dst
 {
 	union {
-		struct xfrm_dst		*next;
 		struct dst_entry	dst;
 		struct rtable		rt;
 		struct rt6_info		rt6;
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 157bfbd..b48f06f 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2141,7 +2141,7 @@ int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first,
 		if (last == first)
 			break;
 
-		last = last->u.next;
+		last = (struct xfrm_dst *)last->u.dst.next;
 		last->child_mtu_cached = mtu;
 	}
 

linux-2.6-raid-autorun.patch:
 drivers/md/md.c           |   82 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/compat_ioctl.c         |    1 
 include/linux/raid/md_u.h |    2 -
 3 files changed, 84 insertions(+), 1 deletion(-)

Index: linux-2.6-raid-autorun.patch
===================================================================
RCS file: linux-2.6-raid-autorun.patch
diff -N linux-2.6-raid-autorun.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-raid-autorun.patch	1 Aug 2007 17:59:05 -0000	1.3
@@ -0,0 +1,119 @@
+--- vanilla/include/linux/raid/md_u.h.md	2006-11-29 16:57:37.000000000 -0500
++++ vanilla/include/linux/raid/md_u.h	2007-01-23 16:12:28.000000000 -0500
+@@ -41,7 +41,7 @@
+ 
+ /* usage */
+ #define RUN_ARRAY		_IOW (MD_MAJOR, 0x30, mdu_param_t)
+-/*  0x31 was START_ARRAY  */
++#define START_ARRAY		_IO (MD_MAJOR, 0x31)
+ #define STOP_ARRAY		_IO (MD_MAJOR, 0x32)
+ #define STOP_ARRAY_RO		_IO (MD_MAJOR, 0x33)
+ #define RESTART_ARRAY_RW	_IO (MD_MAJOR, 0x34)
+--- vanilla/fs/compat_ioctl.h.md	2006-11-29 16:57:37.000000000 -0500
++++ vanilla/fs/compat_ioctl.c	2007-01-23 16:12:28.000000000 -0500
+@@ -128,6 +128,7 @@
+ ULONG_IOCTL(HOT_ADD_DISK)
+ ULONG_IOCTL(SET_DISK_FAULTY)
+ COMPATIBLE_IOCTL(RUN_ARRAY)
++ULONG_IOCTL(START_ARRAY)
+ COMPATIBLE_IOCTL(STOP_ARRAY)
+ COMPATIBLE_IOCTL(STOP_ARRAY_RO)
+ COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
+--- vanilla/drivers/md/md.c.md	2006-11-29 16:57:37.000000000 -0500
++++ vanilla/drivers/md/md.c	2007-01-23 16:12:28.000000000 -0500
+@@ -3486,6 +3486,67 @@
+ }
+ #endif /* !MODULE */
+ 
++/*
++ * import RAID devices based on one partition
++ * if possible, the array gets run as well.
++ */
++
++static int autostart_array(dev_t startdev)
++{
++	char b[BDEVNAME_SIZE];
++	int err = -EINVAL, i;
++	mdp_super_t *sb = NULL;
++	mdk_rdev_t *start_rdev = NULL, *rdev;
++
++	start_rdev = md_import_device(startdev, 0, 0);
++	if (IS_ERR(start_rdev))
++		return err;
++
++
++	/* NOTE: this can only work for 0.90.0 superblocks */
++	sb = (mdp_super_t*)page_address(start_rdev->sb_page);
++	if (sb->major_version != 0 ||
++	    sb->minor_version != 90 ) {
++		printk(KERN_WARNING "md: can only autostart 0.90.0 arrays\n");
++		export_rdev(start_rdev);
++		return err;
++	}
++
++	if (test_bit(Faulty, &start_rdev->flags)) {
++		printk(KERN_WARNING 
++			"md: can not autostart based on faulty %s!\n",
++			bdevname(start_rdev->bdev,b));
++		export_rdev(start_rdev);
++		return err;
++	}
++	list_add(&start_rdev->same_set, &pending_raid_disks);
++
++	for (i = 0; i < MD_SB_DISKS; i++) {
++		mdp_disk_t *desc = sb->disks + i;
++		dev_t dev = MKDEV(desc->major, desc->minor);
++
++		if (!dev)
++			continue;
++		if (dev == startdev)
++			continue;
++		if (MAJOR(dev) != desc->major || MINOR(dev) != desc->minor)
++			continue;
++		rdev = md_import_device(dev, 0, 0);
++		if (IS_ERR(rdev))
++			continue;
++
++		list_add(&rdev->same_set, &pending_raid_disks);
++	}
++
++	/*
++	 * possibly return codes
++	 */
++	autorun_devices(0);
++	return 0;
++
++}
++
++
+ static int get_version(void __user * arg)
+ {
+ 	mdu_version_t ver;
+@@ -4243,6 +4304,27 @@
+ 		goto abort;
+ 	}
+ 
++
++	if (cmd == START_ARRAY) {
++		/* START_ARRAY doesn't need to lock the array as autostart_array
++		 * does the locking, and it could even be a different array
++		 */
++		static int cnt = 3;
++		if (cnt > 0 ) {
++			printk(KERN_WARNING
++			       "md: %s(pid %d) used deprecated START_ARRAY ioctl. "
++			       "This will not be supported beyond July 2006\n",
++			       current->comm, current->pid);
++			cnt--;
++		}
++		err = autostart_array(new_decode_dev(arg));
++		if (err) {
++			printk(KERN_WARNING "md: autostart failed!\n");
++			goto abort;
++		}
++		goto done;
++	}
++
+ 	err = mddev_lock(mddev);
+ 	if (err) {
+ 		printk(KERN_INFO 


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-6/kernel-2.6.spec,v
retrieving revision 1.2999
retrieving revision 1.3000
diff -u -r1.2999 -r1.3000
--- kernel-2.6.spec	30 Jul 2007 14:07:40 -0000	1.2999
+++ kernel-2.6.spec	1 Aug 2007 17:59:03 -0000	1.3000
@@ -534,6 +534,7 @@
 Patch120: linux-2.6-ppc32-ucmpdi2.patch
 Patch130: linux-2.6-ibmvscsi-schizo.patch
 Patch140: linux-2.6-pmac-zilog.patch
+
 Patch150: linux-2.6-build-nonintconfig.patch
 Patch160: linux-2.6-execshield.patch
 Patch170: linux-2.6-modsign-mpilib.patch
@@ -567,6 +568,7 @@
 Patch430: linux-2.6-net-silence-noisy-printks.patch
 Patch431: linux-2.6-tcp-sack-fix-leak-msgs.patch
 Patch432: linux-2.6-net_sched_fix_deadlock.patch
+Patch433: linux-2.6-net-dst_entry-reorder-crash.patch
 Patch440: linux-2.6-sha_alignment.patch
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch451: linux-2.6-input-rfkill-wrong-size-flags.patch
@@ -574,6 +576,7 @@
 Patch480: linux-2.6-proc-self-maps-fix.patch
 Patch490: linux-2.6-softlockup-disable.patch
 Patch510: linux-2.6-silence-noise.patch
+Patch520: linux-2.6-raid-autorun.patch
 Patch570: linux-2.6-selinux-mprotect-checks.patch
 Patch590: linux-2.6-unexport-symbols.patch
 Patch600: linux-2.6-vm-silence-atomic-alloc-failures.patch
@@ -1208,6 +1211,8 @@
 ApplyPatch linux-2.6-tcp-sack-fix-leak-msgs.patch
 # deadlock in net scheduler(s)
 ApplyPatch linux-2.6-net_sched_fix_deadlock.patch
+# fix crash in xfrm4
+ApplyPatch linux-2.6-net-dst_entry-reorder-crash.patch
 
 # Misc fixes
 # Fix SHA1 alignment problem on ia64
@@ -1222,6 +1227,8 @@
 ApplyPatch linux-2.6-softlockup-disable.patch
 # Silence some useless messages that still get printed with 'quiet'
 ApplyPatch linux-2.6-silence-noise.patch
+# restore START_SRRAY ioctl for md driver
+ApplyPatch linux-2.6-raid-autorun.patch
 
 # Fix the SELinux mprotect checks on executable mappings
 ApplyPatch linux-2.6-selinux-mprotect-checks.patch
@@ -2241,6 +2248,10 @@
 %endif
 
 %changelog
+* Wed Aug 01 2007 Chuck Ebbert <cebbert at redhat.com>
+- fix crash in xfrm4
+- restore md driver START_ARRAY ioctl
+
 * Mon Jul 30 2007 Chuck Ebbert <cebbert at redhat.com>
 - sync the CFS scheduler timekeeping changes with upstream
 - fix DMI strings in HP notebook quirk for ALI controller




More information about the fedora-cvs-commits mailing list