[LU-7077] Pointer 'hash' returned from call to function 'cfs_hash_getref' may be NULL and will be dereferenced. Created: 01/Sep/15 Updated: 20/Nov/15 Resolved: 20/Nov/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Dmitry Eremin (Inactive) | Assignee: | Bob Glossman (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | kw | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
lustre/obdclass/genops.c:944 hash = cfs_hash_getref(exp->exp_obd->obd_gen_hash); cfs_hash_del(hash, &ted->ted_lcd->lcd_generation, &exp->exp_gen_hash); cfs_hash_putref(hash); struct cfs_hash *cfs_hash_getref(struct cfs_hash *hs)
{
if (atomic_inc_not_zero(&hs->hs_refcount))
return hs;
return NULL;
}
|
| Comments |
| Comment by Dmitry Eremin (Inactive) [ 01/Sep/15 ] |
|
This was introduced in http://review.whamcloud.com/15576 |
| Comment by Gerrit Updater [ 17/Sep/15 ] |
|
Bob Glossman (bob.glossman@intel.com) uploaded a new patch: http://review.whamcloud.com/16473 |
| Comment by Di Wang [ 24/Sep/15 ] |
|
Dmitry, could you please comment on http://review.whamcloud.com/#/c/16473/1 ? thanks |
| Comment by Dmitry Eremin (Inactive) [ 28/Sep/15 ] |
|
This issue was found by static analysis checker. So, we didn't get a real crash because of it. The question is can we gracefully handle errors or not. |
| Comment by Gerrit Updater [ 19/Nov/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16473/ |
| Comment by Joseph Gmitter (Inactive) [ 20/Nov/15 ] |
|
Landed for 2.8 |