[LU-10877] dt_locate_at reference leak Created: 04/Apr/18 Updated: 15/Apr/18 Resolved: 15/Apr/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.9.0, Lustre 2.10.0, Lustre 2.11.0 |
| Fix Version/s: | Lustre 2.12.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexey Lyashkov | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
any. Test from |
||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
commit f6d6a552398eb1e65857d9bf1afaaf98c8dc1a79 have rewrite a dt_locate_at function to different device tree handling, and this change introduce an object reference leak. + struct lu_object *lo, *n; + ENTRY; + + lo = lu_object_find_at(env, top_dev, fid, NULL); + if (IS_ERR(lo)) + return (void *)lo; + + LASSERT(lo != NULL); + + cfs_list_for_each_entry(n, &lo->lo_header->loh_layers, lo_linkage) { + if (n->lo_dev == &dev->dd_lu_dev) + return container_of0(n, struct dt_object, do_lu); + } + return ERR_PTR(-ENOENT); if some object not in expected tree we have return an ENOENT without an object reference release. It will cause a panic on unmount. |
| Comments |
| Comment by Gerrit Updater [ 04/Apr/18 ] |
|
Alexey Lyashkov (c17817@cray.com) uploaded a new patch: https://review.whamcloud.com/31870 |
| Comment by Gerrit Updater [ 14/Apr/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31870/ |
| Comment by Peter Jones [ 15/Apr/18 ] |
|
Landed for 2.12 |