of Lustre filesystem with 4K stack may cause a stack overflow. For
more information, please refer to bugzilla 17630.
+
+Severity : normal
+Bugzilla : 20122
+Description: don't panic if EPROTO was hit when reading symlink
+Details : correctly handling request reference in error cases.
+
Severity : normal
Bugzilla : 17545
Description: open sometimes returns ENOENT instead of EACCES
#define OBD_FAIL_MDS_FAIL_LOV_LOG_ADD 0x140
#define OBD_FAIL_MDS_LOV_PREP_CREATE 0x141
#define OBD_FAIL_MDS_SPLIT_OPEN 0x142
+#define OBD_FAIL_MDS_READLINK_EPROTO 0x143
#define OBD_FAIL_OST 0x200
#define OBD_FAIL_OST_CONNECT_NET 0x201
#define OBD_FAIL_PTLRPC_PAUSE_REQ 0x50a
#define OBD_FAIL_PTLRPC_PAUSE_REP 0x50c
#define OBD_FAIL_PTLRPC_IMP_DEACTIVE 0x50d
-
#define OBD_FAIL_PTLRPC_DUMP_LOG 0x50e
#define OBD_FAIL_PTLRPC_LONG_REPL_UNLINK 0x50f
#define OBD_FAIL_PTLRPC_LONG_BULK_UNLINK 0x510
/* do not return an error if we cannot cache the symlink locally */
if (lli->lli_symlink_name) {
memcpy(lli->lli_symlink_name, *symname, symlen);
- ptlrpc_req_finished (*request);
- *request = NULL;
*symname = lli->lli_symlink_name;
}
-
RETURN(0);
- failed:
- ptlrpc_req_finished (*request);
+failed:
RETURN (rc);
}
GOTO(out, rc);
rc = vfs_readlink(dentry, buffer, buflen, symname);
- ptlrpc_req_finished(request);
out:
+ ptlrpc_req_finished(request);
up(&lli->lli_size_sem);
RETURN(rc);
}
we delay request releasing until ll_put_link then. */
RETURN(request);
# else
- if (request != NULL) {
+ if (lli->lli_symlink_name == NULL) {
/* falling back to recursive follow link if the request
* needs to be cleaned up still. */
rc = vfs_follow_link(nd, symname);
rc, len - 1);
rc = -EINVAL;
} else {
+ if (OBD_FAIL_CHECK(OBD_FAIL_MDS_READLINK_EPROTO))
+ rc -= 2;
+
CDEBUG(D_INODE, "read symlink dest %s\n", symname);
body->valid |= OBD_MD_LINKNAME;
body->eadatasize = rc + 1;
}
run_test 17h "create objects: lov_free_memmd() doesn't lbug"
+test_17i() { #bug 20018
+ mkdir -p $DIR/$tdir
+ local foo=$DIR/$tdir/$tfile
+ ln -s $foo $foo || error "create symlink failed"
+#define OBD_FAIL_MDS_READLINK_EPROTO 0x143
+ do_facet mds lctl set_param fail_loc=0x80000143
+ ls -l $foo && error "error not detected"
+ return 0
+}
+run_test 17i "don't panic on short symlink"
+
test_18() {
touch $DIR/f
ls $DIR || error