From: Julia Lawall Date: Tue, 4 Sep 2012 13:23:33 +0000 (+0200) Subject: [SCSI] zfcp: remove invalid reference to list iterator variable X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~38^2^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca579c9f136af4274ccfd1bcaee7f38a29a0e2e9;p=pandora-kernel.git [SCSI] zfcp: remove invalid reference to list iterator variable If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. Replace port->adapter->scsi_host by adapter->scsi_host. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Oversight in upsteam commit of v2.6.37 a1ca48319a9aa1c5b57ce142f538e76050bb8972 "[SCSI] zfcp: Move ACL/CFDC code to zfcp_cfdc.c" which merged the content of zfcp_erp_port_access_changed(). Signed-off-by: Julia Lawall Signed-off-by: Steffen Maier Reviewed-by: Martin Peschke Cc: #2.6.37+ Signed-off-by: James Bottomley --- Reading git-diff-tree failed