When a file system is mounted with a disabled OSC reading the import
information from the proc file system can result in a NULL pointer
dereference. The Lustre import on a disabled OSC with remain
in the LUSTRE_IMP_NEW state and imp_connection will remain NULL.
Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Change-Id: Ib416b2d706ac9797715db2c0ea4f4eaa79bceb22
Reviewed-on: http://review.whamcloud.com/2977
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
" connection_attempts: %u\n"
" generation: %u\n"
" in-progress_invalidations: %u\n",
- libcfs_nid2str(imp->imp_connection->c_peer.nid),
+ imp->imp_connection == NULL ? "<none>" :
+ libcfs_nid2str(imp->imp_connection->c_peer.nid),
imp->imp_conn_cnt,
imp->imp_generation,
atomic_read(&imp->imp_inval_count));