Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1394409
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/9] staging: lustre: mdt: extra checking for getattr RPC. |
| Date | 2016-05-04 16:50 +0200 |
| Message-ID | <rv6hK-5S0-61@gated-at.bofh.it> (permalink) |
| References | <rv5Ym-5ES-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: wang di <di.wang@intel.com>
Check whether getattr RPC can hold layout MD(RMF_MDT_MD),
in case the client sends some invalid RPC, which can
cause panic on MDT.
Client will retrieve cl_max_md_size/cl_default_md_size
from MDS during mount process, so it will initialize
cl_max_md_size/cl_default_md_size before sending getattr
to MDS.
Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4222
Reviewed-on: http://review.whamcloud.com/8599
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +-
drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 64be2c1..44dd3f3 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -445,7 +445,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
/* make root inode
* XXX: move this to after cbd setup?
*/
- valid = OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS;
+ valid = OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS | OBD_MD_FLMODEASIZE;
if (sbi->ll_flags & LL_SBI_RMT_CLIENT)
valid |= OBD_MD_FLRMTPERM;
else if (sbi->ll_flags & LL_SBI_ACL)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 46e3a7506..86b7445 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -142,9 +142,8 @@ static int mdc_getattr_common(struct obd_export *exp,
CDEBUG(D_NET, "mode: %o\n", body->mode);
+ mdc_update_max_ea_from_body(exp, body);
if (body->eadatasize != 0) {
- mdc_update_max_ea_from_body(exp, body);
-
eadata = req_capsule_server_sized_get(pill, &RMF_MDT_MD,
body->eadatasize);
if (!eadata)
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/9] staging: lustre: bug fixes from the lustre 2.5.[54-55] release James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 1/9] staging: lustre: nfs: don't panic NFS server if MDS fails to find FID James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 2/9] staging: lustre: osc: Allow lock to be canceled at ENQ time James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 6/9] staging: lustre: debug: clean up console messages James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 4/9] staging: lustre: mdt: extra checking for getattr RPC. James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200
csiph-web