[LU-7943] Suspicious dereference of pointer before NULL check Created: 29/Mar/16  Updated: 21/May/18  Resolved: 21/May/18

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

Type: Bug Priority: Minor
Reporter: Dmitry Eremin (Inactive) Assignee: Arshad Hussain
Resolution: Fixed Votes: 0
Labels: kw

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Suspicious dereference of pointer 'sname' before NULL check at line 786

  • An event which alters the program's state, leading to the defect
    mdd_dir.c:782: 'sname' is dereferenced.
  • An event which alters the program's state, leading to the defect
    mdd_dir.c:786: 'sname' is checked for NULL.
776		static void mdd_changelog_rec_ext_rename(struct changelog_rec *rec,
777							 const struct lu_fid *sfid,
778							 const struct lu_fid *spfid,
779							 const struct lu_name *sname)
780		{
781			struct changelog_ext_rename	*rnm = changelog_rec_rename(rec);
782			size_t				 extsize = sname->ln_namelen + 1;
783		 
784			LASSERT(sfid != NULL);
785			LASSERT(spfid != NULL);
786			LASSERT(sname != NULL);


 Comments   
Comment by Gerrit Updater [ 12/May/18 ]

Arshad Hussain (arshad.super@gmail.com) uploaded a new patch: https://review.whamcloud.com/32376
Subject: LU-7943 mdd: Move assignment after LASSERT()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 145e1b167e8d4609690d60d8e65c341022ca5b31

Comment by Gerrit Updater [ 21/May/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/32376/
Subject: LU-7943 mdd: Move assignment after LASSERT()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a5161cc005aeb383cb326a32976f8d43e7594bb3

Comment by Peter Jones [ 21/May/18 ]

Landed for 2.12

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