[LU-7946] Suspicious dereference of pointer before NULL check in mdt_lock_objects_in_linkea() Created: 29/Mar/16  Updated: 29/Jan/22  Resolved: 29/Jan/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Dmitry Eremin (Inactive) Assignee: WC Triage
Resolution: Not a Bug Votes: 0
Labels: kw

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Suspicious dereference of pointer 'ldata.ld_leh' before NULL check at line 1393

  • An event which alters the program's state, leading to the defect
    mdt_reint.c:1390: 'ldata.ld_leh' is dereferenced.
  • An event which alters the program's state, leading to the defect
    mdt_reint.c:1393: 'ldata.ld_leh' is checked for NULL.
1389			/* ignore the migrating parent(@pobj) */
1390			retry_count = ldata.ld_leh->leh_reccount - 1;
1391		 
1392		again:
1393			LASSERT(ldata.ld_leh != NULL);


 Comments   
Comment by Oleg Drokin [ 29/Mar/16 ]

how about the place where we jump to the again label, though? that might be what we try to protect from.

Comment by Dmitry Eremin (Inactive) [ 29/Mar/16 ]

No, this was introduced in commit 5cb0a721aea53ffc8230190c3a0b35e71a47d35b

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