On Wed, 2015-04-15 at 22:10 +0300, Dan Carpenter wrote: > Hello Nicholas Bellinger, > > This is a semi-automatic email about new static checker warnings. > > The patch 4f60d4039357: "target: Ensure that sess_prot_type is saved > across session restart" from Apr 14, 2015, leads to the following > Smatch complaint: > > drivers/target/target_core_transport.c:349 __transport_register_session() > warn: variable dereferenced before check 'se_nacl' (see line 341) > > drivers/target/target_core_transport.c > 340 else if (tfo->tpg_check_prot_fabric_only) > 341 se_sess->sess_prot_type = se_nacl->saved_prot_type = > ^^^^^^^^^^^^^^^^^^^^^^^^ > New dereferences. > > 342 tfo->tpg_check_prot_fabric_only(se_tpg); > 343 /* > 344 * Used by struct se_node_acl's under ConfigFS to locate active se_session-t > 345 * > 346 * Only set for struct se_session's that will actually be moving I/O. > 347 * eg: *NOT* discovery sessions. > 348 */ > 349 if (se_nacl) { > ^^^^^^^ > Existing code has a check for NULL. Fixed + squashed into the original patch. Thanks Dan ! --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html