rpms/kernel/F-7 linux-2.6-ata-update-noncq.patch, NONE, 1.1 linux-2.6-idr-multiple-bugfixes.patch, NONE, 1.1 linux-2.6-tcp-sack-fix-leak-msgs.patch, NONE, 1.1 linux-2.6-vbe-always-save-ddc.patch, NONE, 1.1 kernel-2.6.spec, 1.3276, 1.3277 linux-2.6-sched-cfs.patch, 1.2, 1.3

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Jul 12 20:00:57 UTC 2007


Author: cebbert

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

Modified Files:
	kernel-2.6.spec linux-2.6-sched-cfs.patch 
Added Files:
	linux-2.6-ata-update-noncq.patch 
	linux-2.6-idr-multiple-bugfixes.patch 
	linux-2.6-tcp-sack-fix-leak-msgs.patch 
	linux-2.6-vbe-always-save-ddc.patch 
Log Message:
* Thu Jul 12 2007 Chuck Ebbert <cebbert at redhat.com>
- ata: update noncq list
- idr: multiple bugfixes
- tcp: sack fix leak msgs
- vbe: always save ddc data


linux-2.6-ata-update-noncq.patch:

--- NEW FILE linux-2.6-ata-update-noncq.patch ---
Combination of two patches submitted upstream:

Add another Maxtor 6B200M0 drive with broken NCQ to the list.
Add Hitachi HDS7250SASUN500G 0621KTAWSD to list of devices with broken NCQ.

Signed-off-by: Prarit Bhargava <prarit <at> redhat.com>
Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

--- linux-2.6.22.noarch.orig/drivers/ata/libata-core.c
+++ linux-2.6.22.noarch/drivers/ata/libata-core.c
@@ -3787,7 +3787,10 @@ static const struct ata_blacklist_entry 
 	{ "FUJITSU MHT2060BH",	NULL,		ATA_HORKAGE_NONCQ },
 	/* NCQ is broken */
 	{ "Maxtor 6L250S0",     "BANC1G10",     ATA_HORKAGE_NONCQ },
+	{ "Maxtor 6B200M0",	"BANC1BM0",	ATA_HORKAGE_NONCQ },
 	{ "Maxtor 6B200M0",	"BANC1B10",	ATA_HORKAGE_NONCQ },
+	{ "HITACHI HDS7250SASUN500G 0621KTAWSD", "K2AOAJ0AHITACHI",
+	  ATA_HORKAGE_NONCQ },
 	/* NCQ hard hangs device under heavier load, needs hard power cycle */
 	{ "Maxtor 6B250S0",	"BANC1B70",	ATA_HORKAGE_NONCQ },
 	/* Blacklist entries taken from Silicon Image 3124/3132

linux-2.6-idr-multiple-bugfixes.patch:

--- NEW FILE linux-2.6-idr-multiple-bugfixes.patch ---
Hoang-Nam Nguyen reported a bug in idr_get_new_above() 
which occurred with a starting id value like 0x3ffffffc.
His test module easily reproduced the problem.  Thanks.

The test revealed the following bugs:

1. Relying on shift operations which have undefined results
   e.g.: 1 << n where n > word size.  On i386 an integer shift
   only uses the low 5 bits of the shift count.

2. An off by one error which prevented the top most layer
   of the radix tree from being allocated.  This meant that
   sub_alloc() would allocate an entry in the existing portion
   of the radix tree which aliased the requested address.  When
   it tried to allocate id 0x40000000, it might use the slot 
   belonging to id 0.

3. There was also a failure in the code which walked back up
   the tree if an allocation failed.  The normal case is to
   descend the tree checking the starting id value against the
   bitmap at each level.  If the bit is set, we know that the
   entire sub-tree is full and we can short cut the search.
   We may still descend to the lowest level and find that the
   portion of the id space we want is full.  In this case we
   need to walk back up the tree and continue the search.
   The existing code just returned to the previous level and
   continued.  This resulted in an attempt to allocate an id
   above 0x3ffffffc using the slot for id 0x3ffffc00 instead of
   0x40000000 which it then claimed to have allocated.  The same
   problem occurs with 0x3ff as the requested id value if it
   is already in use.

With this patch, idr.c should work as advertised allocating id
values in the range 0...0x7fffffff.  Andrew had speculated that
it should allow the full range 0...0xffffffff to be used.  I was
tempted to make changes to allow this, but it would require changes
to API, e.g. making the starting id value and the return value
unsigned.

Signed-off-by: Jim Houston <jim.houston at ccur.com>

--

Index: linux-2.6.22-rc7/include/linux/idr.h
===================================================================
--- linux-2.6.22-rc7.orig/include/linux/idr.h	2007-04-25 23:08:32.000000000 -0400
+++ linux-2.6.22-rc7/include/linux/idr.h	2007-07-06 16:46:31.000000000 -0400
@@ -18,17 +18,9 @@
 #if BITS_PER_LONG == 32
 # define IDR_BITS 5
 # define IDR_FULL 0xfffffffful
-/* We can only use two of the bits in the top level because there is
-   only one possible bit in the top level (5 bits * 7 levels = 35
-   bits, but you only use 31 bits in the id). */
-# define TOP_LEVEL_FULL (IDR_FULL >> 30)
 #elif BITS_PER_LONG == 64
 # define IDR_BITS 6
 # define IDR_FULL 0xfffffffffffffffful
-/* We can only use two of the bits in the top level because there is
-   only one possible bit in the top level (6 bits * 6 levels = 36
-   bits, but you only use 31 bits in the id). */
-# define TOP_LEVEL_FULL (IDR_FULL >> 62)
 #else
 # error "BITS_PER_LONG is not 32 or 64"
 #endif
Index: linux-2.6.22-rc7/lib/idr.c
===================================================================
--- linux-2.6.22-rc7.orig/lib/idr.c	2007-04-25 23:08:32.000000000 -0400
+++ linux-2.6.22-rc7/lib/idr.c	2007-07-10 11:05:19.000000000 -0400
@@ -105,8 +105,8 @@
 
 	id = *starting_id;
 	p = idp->top;
-	l = idp->layers;
-	pa[l--] = NULL;
+	l = idp->layers - 1;
+	pa[l] = NULL;
 	while (1) {
 		/*
 		 * We run around this while until we reach the leaf node...
@@ -117,8 +117,14 @@
 		if (m == IDR_SIZE) {
 			/* no space available go back to previous layer. */
 			l++;
-			id = (id | ((1 << (IDR_BITS * l)) - 1)) + 1;
-			if (!(p = pa[l])) {
+			id = (id | ((1 << (IDR_BITS * l)) - 1));
+			while (((id >> (IDR_BITS * l)) & IDR_MASK) == IDR_MASK)
+				l++;
+			id++;
+			p = pa[l-1];
+			if ((id >= MAX_ID_BIT) || (id < 0))
+				return -3;
+			if (!p) {
 				*starting_id = id;
 				return -2;
 			}
@@ -141,7 +147,7 @@
 			p->ary[m] = new;
 			p->count++;
 		}
-		pa[l--] = p;
+		pa[--l] = p;
 		p = p->ary[m];
 	}
 	/*
@@ -159,7 +165,7 @@
 	 */
 	n = id;
 	while (p->bitmap == IDR_FULL) {
-		if (!(p = pa[++l]))
+		if (!(p = pa[l++]))
 			break;
 		n = n >> IDR_BITS;
 		__set_bit((n & IDR_MASK), &p->bitmap);
@@ -186,7 +192,7 @@
 	 * Add a new layer to the top of the tree if the requested
 	 * id is larger than the currently allocated space.
 	 */
-	while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) {
+	while ((layers < MAX_LEVEL) && (id & ((~0) << (layers*IDR_BITS)))) {
 		layers++;
 		if (!p->count)
 			continue;
@@ -299,7 +305,7 @@
 static void sub_remove(struct idr *idp, int shift, int id)
 {
 	struct idr_layer *p = idp->top;
-	struct idr_layer **pa[MAX_LEVEL];
+	struct idr_layer **pa[MAX_LEVEL+1];
 	struct idr_layer ***paa = &pa[0];
 	int n;
 
@@ -392,7 +398,7 @@
 	/* Mask off upper bits we don't use for the search. */
 	id &= MAX_ID_MASK;
 
-	if (id >= (1 << n))
+	if ((n <= MAX_ID_SHIFT) && (id & ((~0) << n)))
 		return NULL;
 
 	while (n > 0 && p) {
@@ -425,7 +431,7 @@
 
 	id &= MAX_ID_MASK;
 
-	if (id >= (1 << n))
+	if ((n <= MAX_ID_SHIFT) && (id & ((~0) << n)))
 		return ERR_PTR(-EINVAL);
 
 	n -= IDR_BITS;

linux-2.6-tcp-sack-fix-leak-msgs.patch:

--- NEW FILE linux-2.6-tcp-sack-fix-leak-msgs.patch ---
[PATCH] [TCP]: Verify the presence of RETRANS bit when leaving FRTO

For yet unknown reason, something cleared SACKED_RETRANS bit
underneath FRTO.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen at helsinki.fi>
---
 net/ipv4/tcp_input.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 69f9f1e..4e5884a 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1398,7 +1398,9 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag)
 		 * waiting for the first ACK and did not get it)...
 		 */
 		if ((tp->frto_counter == 1) && !(flag&FLAG_DATA_ACKED)) {
-			tp->retrans_out += tcp_skb_pcount(skb);
+			/* For some reason this R-bit might get cleared? */
+			if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)
+				tp->retrans_out += tcp_skb_pcount(skb);
 			/* ...enter this if branch just for the first segment */
 			flag |= FLAG_DATA_ACKED;
 		} else {

linux-2.6-vbe-always-save-ddc.patch:

--- NEW FILE linux-2.6-vbe-always-save-ddc.patch ---
Retrieve VBE EDID/DDC info independent of used video mode

The code to retrieve this information was (a) inside a CONFIG_VIDEO_SELECT
section and (b) protected by a check of a variable (vbe_version) that
would get initialized only when a VESA mode was selected on the command
line.

Signed-off-by: Jan Beulich <jbeulich at novell.com>

 arch/i386/boot/video.S |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

--- linux-2.6.22-rc5/arch/i386/boot/video.S	2007-04-26 05:08:32.000000000 +0200
+++ 2.6.22-rc5-edid-no-vesa-mode/arch/i386/boot/video.S	2007-06-19 14:34:50.000000000 +0200
@@ -96,6 +96,7 @@
 #define PARAM_LFB_PAGES		0x32
 #define PARAM_VESA_ATTRIB	0x34
 #define PARAM_CAPABILITIES	0x36
+#define PARAM_EDID_INFO		0x140
 
 /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
 #ifdef CONFIG_VIDEO_RETAIN
@@ -132,8 +133,8 @@ vid1:
 #ifdef CONFIG_VIDEO_RETAIN
 	call	restore_screen			# Restore screen contents
 #endif /* CONFIG_VIDEO_RETAIN */
-	call	store_edid
 #endif /* CONFIG_VIDEO_SELECT */
+	call	store_edid
 	call	mode_params			# Store mode parameters
 	popw	%ds				# Restore original DS
 	ret
@@ -571,16 +572,12 @@ setr1:	lodsw
 	jmp	_m_s
 
 check_vesa:
-#ifdef CONFIG_FIRMWARE_EDID
 	leaw	modelist+1024, %di
 	movw	$0x4f00, %ax
 	int	$0x10
 	cmpw	$0x004f, %ax
 	jnz	setbad
 
-	movw	4(%di), %ax
-	movw	%ax, vbe_version
-#endif
 	leaw	modelist+1024, %di
 	subb	$VIDEO_FIRST_VESA>>8, %bh
 	movw	%bx, %cx			# Get mode information structure
@@ -1935,6 +1932,7 @@ skip10:	movb	%ah, %al
 	popw	%cx
 	popw	%ax
 	ret
+#endif /* CONFIG_VIDEO_SELECT */
 
 store_edid:
 #ifdef CONFIG_FIRMWARE_EDID
@@ -1945,18 +1943,28 @@ store_edid:
 	pushw	%dx
 	pushw   %di
 
+	pushw	%ds
+	popw    %es
+	leaw	modelist, %di
+	movw	$0x4f00, %ax
+	int	$0x10
+	cmpw	$0x004f, %ax
+	setne	%dl
+	cmpw	$0x0200, 4(%di)			# only do EDID on >= VBE2.0
+	adc	%dl, %dl
+
 	pushw	%fs
 	popw    %es
 
 	movl	$0x13131313, %eax		# memset block with 0x13
 	movw    $32, %cx
-	movw	$0x140, %di
+	movw	$PARAM_EDID_INFO, %di
 	cld
 	rep
 	stosl
 
-	cmpw	$0x0200, vbe_version		# only do EDID on >= VBE2.0
-	jl	no_edid
+	testb	%dl, %dl
+	jnz	no_edid
 
 	pushw   %es				# save ES
 	xorw    %di, %di                        # Report Capability
@@ -1978,7 +1986,7 @@ store_edid:
 	movw	$0x01, %bx
 	movw	$0x00, %cx
 	movw    $0x00, %dx
-	movw	$0x140, %di
+	movw	$PARAM_EDID_INFO, %di
 	int	$0x10
 
 no_edid:
@@ -1991,6 +1999,7 @@ no_edid:
 #endif
 	ret
 
+#ifdef CONFIG_VIDEO_SELECT
 # VIDEO_SELECT-only variables
 mt_end:		.word	0	# End of video mode table if built
 edit_buf:	.space	6	# Line editor buffer
@@ -2000,7 +2009,6 @@ do_restore:	.byte	0	# Screen contents al
 svga_prefix:	.byte	VIDEO_FIRST_BIOS>>8	# Default prefix for BIOS modes
 graphic_mode:	.byte	0	# Graphic mode with a linear frame buffer
 dac_size:	.byte	6	# DAC bit depth
-vbe_version:	.word	0	# VBE bios version
 
 # Status messages
 keymsg:		.ascii	"Press <RETURN> to see video modes available, "


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3276
retrieving revision 1.3277
diff -u -r1.3276 -r1.3277
--- kernel-2.6.spec	12 Jul 2007 18:37:33 -0000	1.3276
+++ kernel-2.6.spec	12 Jul 2007 20:00:24 -0000	1.3277
@@ -528,6 +528,8 @@
 Patch210: linux-2.6-modsign-ksign.patch
 Patch220: linux-2.6-modsign-core.patch
 Patch230: linux-2.6-modsign-script.patch
+Patch240: linux-2.6-idr-multiple-bugfixes.patch
+Patch241: linux-2.6-vbe-always-save-ddc.patch
 Patch250: linux-2.6-debug-sizeof-structs.patch
 Patch260: linux-2.6-debug-nmi-timeout.patch
 Patch270: linux-2.6-debug-taint-vm.patch
@@ -545,6 +547,7 @@
 Patch420: linux-2.6-squashfs.patch
 Patch421: linux-2.6-jbd-fix-transaction-dropping.patch
 Patch430: linux-2.6-net-silence-noisy-printks.patch
+Patch431: linux-2.6-tcp-sack-fix-leak-msgs.patch
 Patch440: linux-2.6-sha_alignment.patch
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch460: linux-2.6-serial-460800.patch
@@ -559,6 +562,7 @@
 Patch630: linux-2.6-defaults-nonmi.patch
 Patch660: linux-2.6-libata-ali-atapi-dma.patch
 Patch661: linux-2.6-libata-ich8m-add-pciid.patch
+Patch662: linux-2.6-ata-update-noncq.patch
 Patch670: linux-2.6-ata-quirk.patch
 Patch680: git-wireless-dev.patch
 Patch681: git-iwlwifi.patch
@@ -1087,7 +1091,10 @@
 #
 # bugfixes to drivers and filesystems
 #
-
+# idr allocator: bug fixes
+ApplyPatch linux-2.6-idr-multiple-bugfixes.patch
+# VESA VBE/DDC always save the VBE/DDC data
+ApplyPatch linux-2.6-vbe-always-save-ddc.patch
 
 # Various low-impact patches to aid debugging.
 ApplyPatch linux-2.6-debug-sizeof-structs.patch
@@ -1134,6 +1141,8 @@
 # Networking
 # Disable easy to trigger printk's.
 ApplyPatch linux-2.6-net-silence-noisy-printks.patch
+# fix leak in tcp SACk processing
+ApplyPatch linux-2.6-tcp-sack-fix-leak-msgs.patch
 
 # Misc fixes
 # Fix SHA1 alignment problem on ia64
@@ -1172,6 +1181,8 @@
 # libata: don't initialize sg in ata_exec_internal() if DMA_NONE
 #libata add ich8m (santa rosa) pata controller ID
 ApplyPatch linux-2.6-libata-ich8m-add-pciid.patch
+# libata: update the noncq list
+ApplyPatch linux-2.6-ata-update-noncq.patch
 # ia64 ata quirk
 ApplyPatch linux-2.6-ata-quirk.patch
 
@@ -2125,6 +2136,12 @@
 %endif
 
 %changelog
+* Thu Jul 12 2007 Chuck Ebbert <cebbert at redhat.com>
+- ata: update noncq list
+- idr: multiple bugfixes
+- tcp: sack fix leak msgs
+- vbe: always save ddc data
+
 * Thu Jul 12 2007 Jarod Wilson <jwilson at redhat.com>
 - Fix up some uname -r issues in certain kernel version
   cases (due to new versioning scheme)

linux-2.6-sched-cfs.patch:

Index: linux-2.6-sched-cfs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-sched-cfs.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-sched-cfs.patch	10 Jul 2007 17:48:59 -0000	1.2
+++ linux-2.6-sched-cfs.patch	12 Jul 2007 20:00:24 -0000	1.3
@@ -4745,7 +4745,7 @@
 +static inline void sched_init_granularity(void)
 +{
 +	unsigned int factor = 1 + ilog2(num_online_cpus());
-+	const unsigned long gran_limit = 10000000;
++	const unsigned long gran_limit = 100000000;
 +
 +	sysctl_sched_granularity *= factor;
 +	if (sysctl_sched_granularity > gran_limit)
@@ -5750,7 +5750,7 @@
 +	u64 now = ktime_to_ns(ktime_get());
 +	int cpu;
 +
-+	SEQ_printf(m, "Sched Debug Version: v0.04, cfs-v19, %s %.*s\n",
++	SEQ_printf(m, "Sched Debug Version: v0.05, %s %.*s\n",
 +		init_utsname()->release,
 +		(int)strcspn(init_utsname()->version, " "),
 +		init_utsname()->version);




More information about the fedora-extras-commits mailing list