On 02/23/2015 06:32 AM, Dan Carpenter wrote: > Hello Brian King, > > This is a semi-automatic email about new static checker warnings. > > The patch 89aad4283173: "[SCSI] ipr: Increase max concurrent > oustanding commands" from Mar 14, 2012, leads to the following Smatch > complaint: > > drivers/scsi/ipr.c:9038 ipr_alloc_cmd_blks() > error: we previously assumed 'ioa_cfg->ipr_cmnd_list' could be null (see line 9037) > > drivers/scsi/ipr.c > 9036 > 9037 if (!ioa_cfg->ipr_cmnd_list || !ioa_cfg->ipr_cmnd_list_dma) { > ^^^^^^^^^^^^^^^^^^^^^^ > This can be NULL. > > 9038 ipr_free_cmd_blks(ioa_cfg); > ^^^^^^^ > But we dereference it unconditionally inside the ipr_free_cmd_blks() > function when we check: "if (ioa_cfg->ipr_cmnd_list[i])". These kinds > of magic free everything functions are almost always buggy but Smatch > missed this bug initialy and I had to update it. I'll push the Smatch > change later this week. It requires the cross function database to > trigger this warning. Thanks Dan. I'll queue up a fix for this one. -Brian -- Brian King Power Linux I/O IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html