rpms/kernel/F-12 nfs-fix-an-oops-when-truncating-a-file.patch, NONE, 1.1.2.1 kernel.spec, 1.1960.2.22, 1.1960.2.23
Kyle McMartin
kyle at fedoraproject.org
Mon Feb 22 20:50:31 UTC 2010
Author: kyle
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22785
Modified Files:
Tag: private-fedora-12-2_6_31
kernel.spec
Added Files:
Tag: private-fedora-12-2_6_31
nfs-fix-an-oops-when-truncating-a-file.patch
Log Message:
* Mon Feb 22 2010 Kyle McMartin <kyle at redhat.com>
- nfs-fix-an-oops-when-truncating-a-file.patch: from 2.6.32-stable queue.
nfs-fix-an-oops-when-truncating-a-file.patch:
pagelist.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- NEW FILE nfs-fix-an-oops-when-truncating-a-file.patch ---
>From e8bc0139f017d25926f545a89ddf7de28528e2f6 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <Trond.Myklebust at netapp.com>
Date: Wed, 3 Feb 2010 08:27:22 -0500
Subject: NFS: Fix an Oops when truncating a file
The VM/VFS does not allow mapping->a_ops->invalidatepage() to fail.
Unfortunately, nfs_wb_page_cancel() may fail if a fatal signal occurs.
Since the NFS code assumes that the page stays mapped for as long as the
writeback is active, we can end up Oopsing (among other things).
The only safe fix here is to convert nfs_wait_on_request(), so as to make
it uninterruptible (as is already the case with wait_on_page_writeback()).
Signed-off-by: Trond Myklebust <Trond.Myklebust at netapp.com>
Cc: stable at kernel.org
---
fs/nfs/pagelist.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index e297593..a12c45b 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -176,6 +176,12 @@ void nfs_release_request(struct nfs_page *req)
kref_put(&req->wb_kref, nfs_free_request);
}
+static int nfs_wait_bit_uninterruptible(void *word)
+{
+ io_schedule();
+ return 0;
+}
+
/**
* nfs_wait_on_request - Wait for a request to complete.
* @req: request to wait upon.
@@ -186,14 +192,9 @@ void nfs_release_request(struct nfs_page *req)
int
nfs_wait_on_request(struct nfs_page *req)
{
- int ret = 0;
-
- if (!test_bit(PG_BUSY, &req->wb_flags))
- goto out;
- ret = out_of_line_wait_on_bit(&req->wb_flags, PG_BUSY,
- nfs_wait_bit_killable, TASK_KILLABLE);
-out:
- return ret;
+ return wait_on_bit(&req->wb_flags, PG_BUSY,
+ nfs_wait_bit_uninterruptible,
+ TASK_UNINTERRUPTIBLE);
}
/**
--
1.6.6
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1960.2.22
retrieving revision 1.1960.2.23
diff -u -p -r1.1960.2.22 -r1.1960.2.23
--- kernel.spec 19 Feb 2010 18:04:38 -0000 1.1960.2.22
+++ kernel.spec 22 Feb 2010 20:50:29 -0000 1.1960.2.23
@@ -767,6 +767,7 @@ Patch3020: xfs_swap_extents-needs-to-han
Patch3050: linux-2.6.31-nfsd-proot.patch
Patch3060: linux-2.6-nfs4-ver4opt.patch
Patch3061: linux-2.6-nfs4-callback-hidden.patch
+Patch3063: nfs-fix-an-oops-when-truncating-a-file.patch
# VIA Nano / VX8xx updates
Patch11010: via-hwmon-temp-sensor.patch
@@ -1334,6 +1335,7 @@ ApplyPatch linux-2.6-btrfs-upstream.patc
ApplyPatch linux-2.6.31-nfsd-proot.patch
ApplyPatch linux-2.6-nfs4-ver4opt.patch
ApplyPatch linux-2.6-nfs4-callback-hidden.patch
+ApplyPatch nfs-fix-an-oops-when-truncating-a-file.patch
# USB
ApplyPatch linux-2.6-driver-level-usb-autosuspend.diff
@@ -2235,6 +2237,9 @@ fi
# futex-handle-user-space-corruption-gracefully.patch
%changelog
+* Mon Feb 22 2010 Kyle McMartin <kyle at redhat.com>
+- nfs-fix-an-oops-when-truncating-a-file.patch: from 2.6.32-stable queue.
+
* Fri Feb 19 2010 Kyle McMartin <kyle at redhat.com> 2.6.31.12-174.2.22
- ext4: disable quota 'fixes' which... weren't. (wrong i_block accounting.)
More information about the scm-commits
mailing list