/[linux-patches]/genpatches-2.6/historical/2.6.10/1145_nfs-directio.patch
Gentoo

Contents of /genpatches-2.6/historical/2.6.10/1145_nfs-directio.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download) (as text)
Sat Jun 11 23:16:54 2005 UTC (15 years ago) by dsd
File MIME type: text/x-diff
File size: 1094 byte(s)
Import historical releases
1 # ChangeSet
2 # 2005/01/04 15:57:25-08:00 brugolsky@telemetry-investments.com.
3 # [PATCH] NFS client O_DIRECT error case fix
4 #
5 # The NFS direct-io error return path for request sizes greater than
6 # MAX_DIRECTIO_SIZE fails to initialize the returned page struct array
7 # pointer to NULL.
8 #
9 # Discovered using AKPM's ext3-tools: odwrite -ko 0 16385 foo
10 #
11 # Signed-off-by: Bill Rugolsky <brugolsky@telemetry-investments.com>
12 # Signed-off-by: Linus Torvalds <torvalds@osdl.org>
13 #
14 # fs/nfs/direct.c
15 # 2005/01/04 13:55:37-08:00 brugolsky@telemetry-investments.com +3 -1
16 # NFS client O_DIRECT error case fix
17 #
18 diff -Nru linux-2.6.10/fs/nfs/direct.c linux-2.6.10.plasmaroo/fs/nfs/direct.c
19 --- linux-2.6.10/fs/nfs/direct.c 2005-01-11 21:28:34 +01:00
20 +++ linux-2.6.10.plasmaroo/fs/nfs/direct.c 2005-01-11 21:28:34 +01:00
21 @@ -73,7 +73,10 @@
22
23 /* set an arbitrary limit to prevent arithmetic overflow */
24 if (size > MAX_DIRECTIO_SIZE)
25 + {
26 + *pages = NULL;
27 return -EFBIG;
28 + }
29
30 page_count = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
31 page_count -= user_addr >> PAGE_SHIFT;

  ViewVC Help
Powered by ViewVC 1.1.20