WSL2-Linux-Kernel/fs/nfsd
NeilBrown 250f391518 [PATCH] knfsd: fix an NFSD bug with full sized, non-page-aligned reads
NFSd assumes that largest number of pages that will be needed for a
request+response is 2+N where N pages is the size of the largest permitted
read/write request.  The '2' are 1 for the non-data part of the request, and 1
for the non-data part of the reply.

However, when a read request is not page-aligned, and we choose to use
->sendfile to send it directly from the page cache, we may need N+1 pages to
hold the whole reply.  This can overflow and array and cause an Oops.

This patch increases size of the array for holding pages by one and makes sure
that entry is NULL when it is not in use.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-26 13:50:59 -08:00
..
Makefile [PATCH] knfsd: nfsd4: reboot hash 2005-06-24 00:06:33 -07:00
auth.c [PATCH] knfsd: nfsd: nfsd_setuser doesn't really need to modify rqstp->rq_cred. 2006-04-11 06:18:52 -07:00
export.c [PATCH] knfsd: Fix up some bit-rot in exp_export 2006-12-13 09:05:54 -08:00
lockd.c [PATCH] lockd endianness annotations 2006-12-13 09:05:52 -08:00
nfs2acl.c [PATCH] NFS2: Calculate 'w' a bit later in nfsaclsvc_encode_getaclres() 2006-12-08 08:29:01 -08:00
nfs3acl.c [PATCH] NFS3: Calculate 'w' a bit later in nfs3svc_encode_getaclres() 2006-12-08 08:29:02 -08:00
nfs3proc.c [PATCH] nfsd4: fix open-create permissions 2006-11-08 18:29:23 -08:00
nfs3xdr.c [PATCH] remove NFSD_OPTIMIZE_SPACE 2006-12-07 08:39:45 -08:00
nfs4acl.c [PATCH] knfsd: nfsd4: acls: fix handling of zero-length acls 2006-10-04 07:55:20 -07:00
nfs4callback.c [PATCH] nfsd: misc endianness annotations 2006-10-20 10:26:43 -07:00
nfs4idmap.c [PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc 2006-09-27 08:26:10 -07:00
nfs4proc.c [PATCH] knfsd: nfsd4: simplify filehandle check 2006-12-13 09:05:54 -08:00
nfs4recover.c [PATCH] lockdep: annotate nfsd4 recover code 2006-12-08 08:29:01 -08:00
nfs4state.c [PATCH] knfsd: nfsd4: reorganize compound ops 2006-12-13 09:05:54 -08:00
nfs4xdr.c [PATCH] knfsd: nfsd4: handling more nfsd_cross_mnt errors in nfsd4 readdir 2006-12-13 09:05:54 -08:00
nfscache.c [PATCH] nfsd: replace kmalloc+memset with kcalloc + simplify NULL check 2006-12-08 08:29:02 -08:00
nfsctl.c [PATCH] nfsd: change uses of f_{dentry, vfsmnt} to use f_path 2006-12-08 08:28:42 -08:00
nfsfh.c [PATCH] knfsd: nfsd: don't drop silently on upcall deferral 2006-12-13 09:05:54 -08:00
nfsproc.c [PATCH] nfsd: NFSv{2,3} trivial endianness annotations for error values 2006-10-20 10:26:42 -07:00
nfssvc.c [PATCH] knfsd: fix setting of ACL server versions 2007-01-26 13:50:59 -08:00
nfsxdr.c [PATCH] remove NFSD_OPTIMIZE_SPACE 2006-12-07 08:39:45 -08:00
stats.c [PATCH] knfsd: nfsd4: add per-operation server stats 2006-07-10 13:24:27 -07:00
vfs.c [PATCH] knfsd: fix an NFSD bug with full sized, non-page-aligned reads 2007-01-26 13:50:59 -08:00