[LU-4911] Using wrong attr inside mdd_is_subdir Created: 15/Apr/14 Updated: 09/Oct/21 Resolved: 09/Oct/21 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Di Wang | Assignee: | WC Triage |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 13555 | ||||||||
| Description |
|
in mdd_is_subdir, it keeps using the same attr for all parents lookup, static int mdd_is_parent(const struct lu_env *env,
struct mdd_device *mdd,
struct mdd_object *p1,
const struct lu_attr *attr,
const struct lu_fid *lf,
struct lu_fid *pf)
{
......
for(;;) {
/* this is done recursively, bypass capa for each obj */
mdd_set_capainfo(env, 4, p1, BYPASS_CAPA);
rc = mdd_parent_fid(env, p1, attr, pfid);
.....
p1 = parent; <----- p1 is changed to its parent, we should retrieve new attr here.
}
}
|
| Comments |
| Comment by Andreas Dilger [ 15/Apr/14 ] |
|
Di, how critical is this issue? Does it need to be a blocker for 2.6.0? Does it mean the remote directories are not working correctly? |
| Comment by Di Wang [ 15/Apr/14 ] |
|
oh, not critical, probably not serious enough to become a blocker. I just found this issue, when I inspect #9538, I guess it might cause some security issue, since we use the attr to do permission check here. But the fix should be easy IMHO, just add another attr_get before call mdd_parent_fid. |
| Comment by Andreas Dilger [ 09/Oct/21 ] |
|
Fixed via |