[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?


Generated at Sat Feb 10 03:04:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.