projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36fe432
)
NFSv4.1: reject zero layout with zeroed stripe unit
author
Benny Halevy
<bhalevy@panasas.com>
Tue, 22 Feb 2011 23:56:01 +0000
(15:56 -0800)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Fri, 11 Mar 2011 20:38:45 +0000
(15:38 -0500)
Allowing stripe_unit==0 causes the client to crash later on
when dividing by zero.
Reported-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4filelayout.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/nfs4filelayout.c
b/fs/nfs/nfs4filelayout.c
index 7e1d4571b7b225cf09d88689797a2dbb5b08cafb..42855846481781cd7d2bc04b631ab8f2334317bb 100644
(file)
--- a/
fs/nfs/nfs4filelayout.c
+++ b/
fs/nfs/nfs4filelayout.c
@@
-369,8
+369,8
@@
filelayout_check_layout(struct pnfs_layout_hdr *lo,
goto out;
}
- if (fl->stripe_unit % PAGE_SIZE) {
- dprintk("%s
Stripe unit (%u) not page aligned
\n",
+ if (
!fl->stripe_unit ||
fl->stripe_unit % PAGE_SIZE) {
+ dprintk("%s
Invalid stripe unit (%u)
\n",
__func__, fl->stripe_unit);
goto out;
}
This page took
0.025242 seconds
and
5
git commands to generate.