Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
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 LU-6070 patch hash 907a321c9b9e2cd5f5ccf488cc516ba05dee0ad8 by Dmitry.
Attachments
Issue Links
- is related to
-
LU-6070 provide separate buffers for libcfs_*2str()
-
- Resolved
-