Hello Dmitry Eremin,
This is a semi-automatic email about new static checker warnings.
The patch 80feb1ef349e: "staging: lustre: provide separate buffers
for libcfs_*2str()" from Oct 21, 2015, leads to the following Smatch
complaint:
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c:676 lprocfs_rd_import()
warn: variable dereferenced before check 'imp->imp_connection' (see
line 668)
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
667 }
668 libcfs_nid2str_r(imp->imp_connection->c_peer.nid,
^^^^^^^^^^^^^^^^^^^^^
Patch introduces a new dereference.
669 nidstr, sizeof(nidstr));
670 seq_printf(m,
671 "]\n"
672 " current_connection: %s\n"
673 " connection_attempts: %u\n"
674 " generation: %u\n"
675 " in-progress_invalidations: %u\n",
676 imp->imp_connection == NULL ? "<none>" : nidstr,
^^^^^^^^^^^^^^^^^^^
Old code assumes it can be NULL.
677 imp->imp_conn_cnt,
678 imp->imp_generation,
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel