[LU-5431] lmv_intent_lookup() leaks lock if lmv_revalidate_slaves() fails Created: 30/Jul/14 Updated: 27/Apr/15 Resolved: 27/Apr/15 |
|
| Status: | Closed |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.6.0, Lustre 2.7.0 |
| Fix Version/s: | Lustre 2.7.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | John Hammond |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | dne2 | ||
| Severity: | 3 |
| Rank (Obsolete): | 15126 |
| Description |
|
In lmv_intent_lookup() if md_intent_lock() succeeds but lmv_revalidate_slaves() fails then the lock referenced by it->d.lustre.it_lock_handle is leaked. rc = md_intent_lock(tgt->ltd_exp, op_data, it, reqp, cb_blocking,
extra_lock_flags);
if (rc < 0)
RETURN(rc);
if (*reqp == NULL) {
/* If RPC happens, lsm information will be revalidated
* during update_inode process (see ll_update_lsm_md) */
if (op_data->op_mea2 != NULL) {
rc = lmv_revalidate_slaves(exp, NULL, op_data->op_mea2,
cb_blocking,
extra_lock_flags);
if (rc != 0)
RETURN(rc);
}
RETURN(rc);
}
This was found through manual code audit. |
| Comments |
| Comment by John Hammond [ 04/Aug/14 ] |
|
Please see http://review.whamcloud.com/11319. |
| Comment by John Hammond [ 07/Aug/14 ] |
|
A bit of instrumentation shows that this is easy to hit running racer. |
| Comment by Jodi Levi (Inactive) [ 11/Aug/14 ] |
|
Patch landed to Master. |