rpms/kernel/F-8 linux-2.6-md-raid5-move-code-to-proper-place.patch, NONE, 1.1 linux-2.6-net-fix-panic-removing-teql-devices.patch, NONE, 1.1 linux-2.6-net-l2tp-fix-oops-in-xmit-receive.patch, NONE, 1.1 linux-2.6-nfs-fix-writeback-race.patch, NONE, 1.1 linux-2.6-x86-setup-add-near-jump.patch, NONE, 1.1 kernel.spec, 1.256, 1.257
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Wed Nov 7 17:15:37 UTC 2007
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20433
Modified Files:
kernel.spec
Added Files:
linux-2.6-md-raid5-move-code-to-proper-place.patch
linux-2.6-net-fix-panic-removing-teql-devices.patch
linux-2.6-net-l2tp-fix-oops-in-xmit-receive.patch
linux-2.6-nfs-fix-writeback-race.patch
linux-2.6-x86-setup-add-near-jump.patch
Log Message:
* Wed Nov 7 2007 Chuck Ebbert <cebbert at redhat.com>
- md/raid5: fix misapplication of previous patch
- net: fix panic removing devices from teql secheduler
- net: fix oops in l2tp transmit and receive
- nfs: fix writeback race causing data corruption
- x86 setup: fix boot on 486DX4 processor
linux-2.6-md-raid5-move-code-to-proper-place.patch:
--- NEW FILE linux-2.6-md-raid5-move-code-to-proper-place.patch ---
From: Neil Brown <neilb at suse.de>
To: Justin Piszcz <jpiszcz at lucidpixels.com>
Date: Mon, 5 Nov 2007 08:49:55 +1100
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <18222.16003.92062.970530 at notabene.brown>
Cc: linux-kernel at vger.kernel.org, linux-raid at vger.kernel.org
Subject: Re: 2.6.23.1: mdadm/raid5 hung/d-state
In-Reply-To: message from Justin Piszcz on Sunday November 4
References: <Pine.LNX.4.64.0711040658180.30831 at p34.internal.lan>
X-Mailer: VM 7.19 under Emacs 21.4.1
X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D<ml'fY1Vw+ at XfR[fRCsUoP?K6bt3YD\ui5Fh?f
LONpR';(ql)VM_TQ/<l_^D3~B:z$\YC7gUCuC=sYm/80G=$tt"98mr8(l))QzVKCk$6~gldn~*FK9x
8`;pM{3S8679sP+MbP,72<3_PIH-$I&iaiIb|hV1d%cYg))BmI)AZ
Sender: linux-kernel-owner at vger.kernel.org
Precedence: bulk
X-Mailing-List: linux-kernel at vger.kernel.org
On Sunday November 4, jpiszcz at lucidpixels.com wrote:
> # ps auxww | grep D
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> root 273 0.0 0.0 0 0 ? D Oct21 14:40 [pdflush]
> root 274 0.0 0.0 0 0 ? D Oct21 13:00 [pdflush]
>
> After several days/weeks, this is the second time this has happened, while
> doing regular file I/O (decompressing a file), everything on the device
> went into D-state.
At a guess (I haven't looked closely) I'd say it is the bug that was
meant to be fixed by
commit 4ae3f847e49e3787eca91bced31f8fd328d50496
except that patch applied badly and needed to be fixed with
the following patch (not in git yet).
These have been sent to stable@ and should be in the queue for 2.6.23.2
NeilBrown
Fix misapplied patch in raid5.c
commit 4ae3f847e49e3787eca91bced31f8fd328d50496 did not get applied
correctly, presumably due to substantial similarities between
handle_stripe5 and handle_stripe6.
This patch (with lots of context) moves the chunk of new code from
handle_stripe6 (where it isn't needed (yet)) to handle_stripe5.
Signed-off-by: Neil Brown <neilb at suse.de>
### Diffstat output
./drivers/md/raid5.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c 2007-11-02 12:10:49.000000000 +1100
+++ ./drivers/md/raid5.c 2007-11-02 12:25:31.000000000 +1100
@@ -2607,40 +2607,47 @@ static void handle_stripe5(struct stripe
struct bio *return_bi = NULL;
struct stripe_head_state s;
struct r5dev *dev;
unsigned long pending = 0;
memset(&s, 0, sizeof(s));
pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d "
"ops=%lx:%lx:%lx\n", (unsigned long long)sh->sector, sh->state,
atomic_read(&sh->count), sh->pd_idx,
sh->ops.pending, sh->ops.ack, sh->ops.complete);
spin_lock(&sh->lock);
clear_bit(STRIPE_HANDLE, &sh->state);
clear_bit(STRIPE_DELAYED, &sh->state);
s.syncing = test_bit(STRIPE_SYNCING, &sh->state);
s.expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state);
s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state);
/* Now to look around and see what can be done */
+ /* clean-up completed biofill operations */
+ if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) {
+ clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending);
+ clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack);
+ clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete);
+ }
+
rcu_read_lock();
for (i=disks; i--; ) {
mdk_rdev_t *rdev;
struct r5dev *dev = &sh->dev[i];
clear_bit(R5_Insync, &dev->flags);
pr_debug("check %d: state 0x%lx toread %p read %p write %p "
"written %p\n", i, dev->flags, dev->toread, dev->read,
dev->towrite, dev->written);
/* maybe we can request a biofill operation
*
* new wantfill requests are only permitted while
* STRIPE_OP_BIOFILL is clear
*/
if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread &&
!test_bit(STRIPE_OP_BIOFILL, &sh->ops.pending))
set_bit(R5_Wantfill, &dev->flags);
/* now count some things */
@@ -2880,47 +2887,40 @@ static void handle_stripe6(struct stripe
struct stripe_head_state s;
struct r6_state r6s;
struct r5dev *dev, *pdev, *qdev;
r6s.qd_idx = raid6_next_disk(pd_idx, disks);
pr_debug("handling stripe %llu, state=%#lx cnt=%d, "
"pd_idx=%d, qd_idx=%d\n",
(unsigned long long)sh->sector, sh->state,
atomic_read(&sh->count), pd_idx, r6s.qd_idx);
memset(&s, 0, sizeof(s));
spin_lock(&sh->lock);
clear_bit(STRIPE_HANDLE, &sh->state);
clear_bit(STRIPE_DELAYED, &sh->state);
s.syncing = test_bit(STRIPE_SYNCING, &sh->state);
s.expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state);
s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state);
/* Now to look around and see what can be done */
- /* clean-up completed biofill operations */
- if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) {
- clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending);
- clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack);
- clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete);
- }
-
rcu_read_lock();
for (i=disks; i--; ) {
mdk_rdev_t *rdev;
dev = &sh->dev[i];
clear_bit(R5_Insync, &dev->flags);
pr_debug("check %d: state 0x%lx read %p write %p written %p\n",
i, dev->flags, dev->toread, dev->towrite, dev->written);
/* maybe we can reply to a read */
if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread) {
struct bio *rbi, *rbi2;
pr_debug("Return read for disc %d\n", i);
spin_lock_irq(&conf->device_lock);
rbi = dev->toread;
dev->toread = NULL;
if (test_and_clear_bit(R5_Overlap, &dev->flags))
wake_up(&conf->wait_for_overlap);
spin_unlock_irq(&conf->device_lock);
while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) {
copy_data(0, rbi, dev->page, dev->sector);
-
linux-2.6-net-fix-panic-removing-teql-devices.patch:
--- NEW FILE linux-2.6-net-fix-panic-removing-teql-devices.patch ---
From: Evgeniy Polyakov <johnpol at 2ka.mipt.ru>
Date: Tue, 6 Nov 2007 11:08:09 +0000 (-0800)
Subject: [PKT_SCHED]: Fix OOPS when removing devices from a teql queuing discipline
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdavem%2Fnet-2.6.git;a=commitdiff_plain;h=4f9f8311a08c0d95c70261264a2b47f2ae99683a
[PKT_SCHED]: Fix OOPS when removing devices from a teql queuing discipline
tecl_reset() is called from deactivate and qdisc is set to noop already,
but subsequent teql_xmit does not know about it and dereference private
data as teql qdisc and thus oopses.
not catch it first :)
Signed-off-by: Evgeniy Polyakov <johnpol at 2ka.mipt.ru>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 421281d..c0ed06d 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -252,6 +252,9 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
static __inline__ int
teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev)
{
+ if (dev->qdisc == &noop_qdisc)
+ return -ENODEV;
+
if (dev->hard_header == NULL ||
skb->dst == NULL ||
skb->dst->neighbour == NULL)
linux-2.6-net-l2tp-fix-oops-in-xmit-receive.patch:
--- NEW FILE linux-2.6-net-l2tp-fix-oops-in-xmit-receive.patch ---
From: James Chapman <jchapman at katalix.com>
Date: Tue, 6 Nov 2007 07:32:37 +0000 (-0800)
Subject: [PPP]: L2TP: Fix oops in transmit and receive paths
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdavem%2Fnet-2.6.git;a=commitdiff_plain;h=91781004b9c029ee55b7aa9ef950a373ba865dc6
[PPP]: L2TP: Fix oops in transmit and receive paths
Changes made on 18-sep to fix skb handling in the pppol2tp driver
broke the transmit and receive paths. Users are only running into this
now because distros are now using 2.6.23 and I must have messed up
when I tested the change.
For receive, we now do our own calculation of how much to pull from
the skb (variable length L2TP header) rather than using
skb_transport_offset(). Also, if the skb isn't a data packet, it must
be passed back to UDP with skb->data pointing to the UDP header.
For transmit, make sure skb->sk is set up because ip_queue_xmit()
needs it.
Signed-off-by: James Chapman <jchapman at katalix.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index f8904fd..a7556cd 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -488,7 +488,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
{
struct pppol2tp_session *session = NULL;
struct pppol2tp_tunnel *tunnel;
- unsigned char *ptr;
+ unsigned char *ptr, *optr;
u16 hdrflags;
u16 tunnel_id, session_id;
int length;
@@ -496,7 +496,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
tunnel = pppol2tp_sock_to_tunnel(sock);
if (tunnel == NULL)
- goto error;
+ goto no_tunnel;
/* UDP always verifies the packet length. */
__skb_pull(skb, sizeof(struct udphdr));
@@ -509,7 +509,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
}
/* Point to L2TP header */
- ptr = skb->data;
+ optr = ptr = skb->data;
/* Get L2TP header flags */
hdrflags = ntohs(*(__be16*)ptr);
@@ -637,12 +637,14 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
/* If offset bit set, skip it. */
if (hdrflags & L2TP_HDRFLAG_O) {
offset = ntohs(*(__be16 *)ptr);
- skb->transport_header += 2 + offset;
- if (!pskb_may_pull(skb, skb_transport_offset(skb) + 2))
- goto discard;
+ ptr += 2 + offset;
}
- __skb_pull(skb, skb_transport_offset(skb));
+ offset = ptr - optr;
+ if (!pskb_may_pull(skb, offset))
+ goto discard;
+
+ __skb_pull(skb, offset);
/* Skip PPP header, if present. In testing, Microsoft L2TP clients
* don't send the PPP header (PPP header compression enabled), but
@@ -652,6 +654,9 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
* Note that skb->data[] isn't dereferenced from a u16 ptr here since
* the field may be unaligned.
*/
+ if (!pskb_may_pull(skb, 2))
+ goto discard;
+
if ((skb->data[0] == 0xff) && (skb->data[1] == 0x03))
skb_pull(skb, 2);
@@ -709,6 +714,10 @@ discard:
return 0;
error:
+ /* Put UDP header back */
+ __skb_push(skb, sizeof(struct udphdr));
+
+no_tunnel:
return 1;
}
@@ -1050,6 +1059,8 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
/* Get routing info from the tunnel socket */
dst_release(skb->dst);
skb->dst = sk_dst_get(sk_tun);
+ skb_orphan(skb);
+ skb->sk = sk_tun;
/* Queue the packet to IP for output */
len = skb->len;
linux-2.6-nfs-fix-writeback-race.patch:
--- NEW FILE linux-2.6-nfs-fix-writeback-race.patch ---
From: Trond Myklebust <Trond.Myklebust at netapp.com>
Date: Thu, 18 Oct 2007 21:08:05 +0000 (-0400)
Subject: NFS: Fix a writeback race...
X-Git-Tag: v2.6.24-rc1~133^2~3
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=61e930a904966cc37e0a3404276f0b73037e57ca
NFS: Fix a writeback race...
This patch fixes a regression that was introduced by commit
44dd151d5c21234cc534c47d7382f5c28c3143cd
We cannot zero the user page in nfs_mark_uptodate() any more, since
a) We'd be modifying the page without holding the page lock
b) We can race with other updates of the page, most notably
because of the call to nfs_wb_page() in nfs_writepage_setup().
Instead, we do the zeroing in nfs_update_request() if we see that we're
creating a request that might potentially be marked as up to date.
Thanks to Olivier Paquet for reporting the bug and providing a test-case.
Signed-off-by: Trond Myklebust <Trond.Myklebust at netapp.com>
---
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 0cf9d1c..89527a4 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -174,8 +174,6 @@ static void nfs_mark_uptodate(struct page *page, unsigned int base, unsigned int
return;
if (count != nfs_page_length(page))
return;
- if (count != PAGE_CACHE_SIZE)
- zero_user_page(page, count, PAGE_CACHE_SIZE - count, KM_USER0);
SetPageUptodate(page);
}
@@ -627,7 +625,8 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx,
return ERR_PTR(error);
}
spin_unlock(&inode->i_lock);
- return new;
+ req = new;
+ goto zero_page;
}
spin_unlock(&inode->i_lock);
@@ -655,13 +654,23 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx,
if (offset < req->wb_offset) {
req->wb_offset = offset;
req->wb_pgbase = offset;
- req->wb_bytes = rqend - req->wb_offset;
+ req->wb_bytes = max(end, rqend) - req->wb_offset;
+ goto zero_page;
}
if (end > rqend)
req->wb_bytes = end - req->wb_offset;
return req;
+zero_page:
+ /* If this page might potentially be marked as up to date,
+ * then we need to zero any uninitalised data. */
+ if (req->wb_pgbase == 0 && req->wb_bytes != PAGE_CACHE_SIZE
+ && !PageUptodate(req->wb_page))
+ zero_user_page(req->wb_page, req->wb_bytes,
+ PAGE_CACHE_SIZE - req->wb_bytes,
+ KM_USER0);
+ return req;
}
int nfs_flush_incompatible(struct file *file, struct page *page)
linux-2.6-x86-setup-add-near-jump.patch:
--- NEW FILE linux-2.6-x86-setup-add-near-jump.patch ---
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ed192906a2144ebc8ca2925a85d27b9c5355668
Commit: 7ed192906a2144ebc8ca2925a85d27b9c5355668
Parent: b55d1b1814c52463c11707f53dbdc223e09b2924
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun Nov 4 17:50:12 2007 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun Nov 4 19:47:46 2007 -0800
x86 setup: add a near jump to serialize %cr0 on 386/486
The 386 and 486 needs a jump immediately after setting %cr0 in order
to serialize the pipeline.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
arch/x86/boot/pmjump.S | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index 2e55923..26baeab 100644
--- a/arch/i386/boot/pmjump.S
+++ b/arch/i386/boot/pmjump.S
@@ -31,14 +31,14 @@ protected_mode_jump:
xorl %ebx, %ebx # Flag to indicate this is a boot
movl %edx, %esi # Pointer to boot_params table
movl %eax, 2f # Patch ljmpl instruction
- jmp 1f # Short jump to flush instruction q.
-1:
movw $__BOOT_DS, %cx
movl %cr0, %edx
orb $1, %dl # Protected mode (PE) bit
movl %edx, %cr0
+ jmp 1f # Short jump to serialize on 386/486
+1:
movw %cx, %ds
movw %cx, %es
-
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -r1.256 -r1.257
--- kernel.spec 7 Nov 2007 00:05:35 -0000 1.256
+++ kernel.spec 7 Nov 2007 17:15:01 -0000 1.257
@@ -581,6 +581,7 @@
Patch41: linux-2.6-sysrq-c.patch
Patch50: linux-2.6-ia64-build-id-linker-script-fix.patch
Patch60: linux-2.6-x86-tune-generic.patch
+Patch61: linux-2.6-x86-setup-add-near-jump.patch
Patch70: linux-2.6-x86_64-silence-up-apic-errors.patch
Patch71: linux-2.6-x86-tsc-calibration-1.patch
Patch72: linux-2.6-x86-tsc-calibration-2.patch
@@ -636,10 +637,13 @@
Patch420: linux-2.6-squashfs.patch
Patch423: linux-2.6-gfs-locking-exports.patch
Patch424: linux-2.6-cifs-fix-incomplete-rcv.patch
-Patch426: linux-2.6-cifs-typo-in-cifs_reconnect-fix.patch
-Patch428: linux-2.6-cifs-fix-bad-handling-of-EAGAIN.patch
+Patch425: linux-2.6-cifs-typo-in-cifs_reconnect-fix.patch
+Patch426: linux-2.6-cifs-fix-bad-handling-of-EAGAIN.patch
+Patch428: linux-2.6-nfs-fix-writeback-race.patch
Patch430: linux-2.6-net-silence-noisy-printks.patch
+Patch431: linux-2.6-net-fix-panic-removing-teql-devices.patch
+Patch432: linux-2.6-net-l2tp-fix-oops-in-xmit-receive.patch
Patch440: linux-2.6-sha_alignment.patch
Patch450: linux-2.6-input-kill-stupid-messages.patch
Patch460: linux-2.6-serial-460800.patch
@@ -690,6 +694,7 @@
Patch801: linux-2.6-wakeups.patch
Patch820: linux-2.6-compile-fixes.patch
Patch900: linux-2.6-md-raid5-fix-clearing-of-biofill-operations.patch
+Patch901: linux-2.6-md-raid5-move-code-to-proper-place.patch
Patch1100: linux-2.6-add-mmf_dump_elf_headers.patch
Patch1101: linux-2.6-default-mmf_dump_elf_headers.patch
Patch1102: linux-2.6-add-sys-module-name-notes.patch
@@ -1089,6 +1094,8 @@
# x86(-64)
# Compile 686 kernels tuned for Pentium4.
ApplyPatch linux-2.6-x86-tune-generic.patch
+# x86: fix boot on 486
+ApplyPatch linux-2.6-x86-setup-add-near-jump.patch
# Suppress APIC errors on UP x86-64.
#ApplyPatch linux-2.6-x86_64-silence-up-apic-errors.patch
# fix x86 tsc clock calibration
@@ -1198,10 +1205,16 @@
ApplyPatch linux-2.6-cifs-fix-incomplete-rcv.patch
ApplyPatch linux-2.6-cifs-typo-in-cifs_reconnect-fix.patch
ApplyPatch linux-2.6-cifs-fix-bad-handling-of-EAGAIN.patch
+# nfs writeback race data corruption
+ApplyPatch linux-2.6-nfs-fix-writeback-race.patch
# Networking
# Disable easy to trigger printk's.
ApplyPatch linux-2.6-net-silence-noisy-printks.patch
+# fix panic in teql
+ApplyPatch linux-2.6-net-fix-panic-removing-teql-devices.patch
+# fix oops in l2tp
+ApplyPatch linux-2.6-net-l2tp-fix-oops-in-xmit-receive.patch
# Misc fixes
# Fix SHA1 alignment problem on ia64
@@ -1303,6 +1316,8 @@
# dm / md
# raid5 data corruption fix
ApplyPatch linux-2.6-md-raid5-fix-clearing-of-biofill-operations.patch
+# fix misapplication of above fix
+ApplyPatch linux-2.6-md-raid5-move-code-to-proper-place.patch
# ACPI
# suspend/resume fixes from 2.6.24
@@ -1965,6 +1980,13 @@
%changelog
+* Wed Nov 7 2007 Chuck Ebbert <cebbert at redhat.com>
+- md/raid5: fix misapplication of previous patch
+- net: fix panic removing devices from teql secheduler
+- net: fix oops in l2tp transmit and receive
+- nfs: fix writeback race causing data corruption
+- x86 setup: fix boot on 486DX4 processor
+
* Tue Nov 6 2007 Chuck Ebbert <cebbert at redhat.com>
- update utrace
More information about the fedora-extras-commits
mailing list