[LU-13767] potentially unsace spec check in mdd_object_make_hint() Created: 09/Jul/20 Updated: 09/Jul/20 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.14.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
in mdd_object_make_hint we have this code: if (S_ISDIR(attr->la_mode) &&
unlikely(spec != NULL && spec->sp_cr_flags & MDS_OPEN_HAS_EA)) {
hint->dah_eadata = spec->u.sp_ea.eadata;
hint->dah_eadata_len = spec->u.sp_ea.eadatalen;
} else {
hint->dah_eadata = NULL;
hint->dah_eadata_len = 0;
if (spec->sp_cr_flags & MDS_OPEN_APPEND) {
where we assume spec could be NULL but a bit later we also assume it cannot. probably need to check in both or neither cases? |