[LU-15013] potential null pointer access in osc_prep_async_page Created: 17/Sep/21 Updated: 10/Oct/21 Resolved: 10/Oct/21 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.0 |
| Fix Version/s: | Lustre 2.15.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | James A Simmons |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Introduced by https://review.whamcloud.com/44338
while (--max_scans > 0 &&
(cli = list_first_entry_or_null(&cache->ccc_lru,
struct client_obd,
cl_lru_osc)) != NULL) {
...
}
}
spin_unlock(&cache->ccc_lru_lock);out:
cl_env_put(env, &refcheck);
CDEBUG(D_CACHE, "%s: cli %p freed %ld pages.\n",
cli_name(cli), cli, rc);
So now once that cli is NULL we exit and cli_name dereference will get us if +cache is in the debug flags. |
| Comments |
| Comment by Peter Jones [ 17/Sep/21 ] |
|
James Can this be fixed in place quickly or should we revert the change? Peter |
| Comment by James A Simmons [ 17/Sep/21 ] |
|
Oh I can do a quick fix. |
| Comment by Gerrit Updater [ 17/Sep/21 ] |
|
"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/44966 |
| Comment by Gerrit Updater [ 10/Oct/21 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44966/ |