Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-3647 hsm: small fixes for HSM
[fs/lustre-release.git]
/
lustre
/
llite
/
dir.c
diff --git
a/lustre/llite/dir.c
b/lustre/llite/dir.c
index
719c8ac
..
ace571a
100644
(file)
--- a/
lustre/llite/dir.c
+++ b/
lustre/llite/dir.c
@@
-1828,6
+1828,11
@@
out_rmdir:
/* Compute the whole struct size */
totalsize = hur_len(hur);
OBD_FREE_PTR(hur);
+
+ /* Make sure the size is reasonable */
+ if (totalsize >= MDS_MAXREQSIZE)
+ RETURN(-E2BIG);
+
OBD_ALLOC_LARGE(hur, totalsize);
if (hur == NULL)
RETURN(-ENOMEM);