On Mon, 06 Apr 2009 18:31:47 +0200 Christof Schmitt <christof.schmitt@xxxxxxxxxx> wrote: > + els_fc_job->els.adapter = adapter; > + if (rport) { > + read_lock_irq(&zfcp_data.config_lock); > + port = rport->dd_data; > + if (port) > + zfcp_port_get(port); > + read_unlock_irq(&zfcp_data.config_lock); > + if (!port) { > + kfree(els_fc_job); > + return -EINVAL; > + } > + els_fc_job->els.port = port; > + els_fc_job->els.d_id = port->d_id; > + zfcp_port_put(port); > + } else { This piece looks a bit strange. Why is the reference count of the port increased and afterwards decreased again? Still the pointer to the port gets added to els_fc_job->els.port and therefore the structure will be accessed later. So either the reference count is decreased too early and this is a bug or it's not needed at all. -- 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