Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Lustre 2.15.0
-
3
-
9223372036854775807
Description
smatch highlighted the issue of return value from lov_sub_get() being used in lov_io_read_ahead and lov_io_fault_start.
lov_sub_get can return ERR_PTR as it's return value, so it should be fixed.
Example incorrect code:
sub = lov_sub_get(env, lio, stripe); lov_stripe_offset(loo->lo_lsm, cl_offset(obj, start), stripe, &suboff); rc = cl_io_read_ahead(sub->sub_env, sub->sub_io, cl_index(lovsub2cl(r0->lo_sub[stripe]), suboff), ra);