[LU-6525] USe of unchecked ERR_PTR value from lov_sub_get Created: 27/Apr/15 Updated: 30/Jan/22 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.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 |
|
smatch highlighted the issue of return value from lov_sub_get() being used in lov_io_read_ahead and lov_io_fault_start. 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);
|
| Comments |
| Comment by Andreas Dilger [ 30/Jan/22 ] |
|
Still one case in lov_io_fault_start():
sub = lov_sub_get(env, lio, fio->ft_page->cp_lov_index);
sub->sub_io.u.ci_fault.ft_nob = fio->ft_nob;
|