[LU-6507] Unsaf use of import connection at lprocfs_import_seq_show Created: 27/Apr/15 Updated: 28/May/15 Resolved: 28/May/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
smatch highlighted this bit of code in lprocfs_import_seq_show that does look a bit strange: libcfs_nid2str_r(imp->imp_connection->c_peer.nid,
nidstr, sizeof(nidstr));
seq_printf(m, " ]\n"
" current_connection: %s\n"
" connection_attempts: %u\n"
" generation: %u\n"
" in-progress_invalidations: %u\n",
imp->imp_connection == NULL ? "<none>" : nidstr,
So if imp->imp_connection really could be NULL, we better check for it before dereferencing it in taht call to libcfs_nid2str_r. This was introduced as part of |
| Comments |
| Comment by Gerrit Updater [ 14/May/15 ] |
|
Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/14808 |
| Comment by Gerrit Updater [ 28/May/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14808/ |
| Comment by Peter Jones [ 28/May/15 ] |
|
Landed for 2.8 |