linux_old1/drivers/s390/scsi
Steffen Maier 01e60527f0 [SCSI] zfcp: Bounds checking for deferred error trace
The pl vector has scount elements, i.e. pl[scount-1] is the last valid
element. For maximum sized requests, payload->counter == scount after
the last loop iteration. Therefore, do bounds checking first (with
boolean shortcut) to not access the invalid element pl[scount].

Do not trust the maximum sbale->scount value from the HBA
but ensure we won't access the pl vector out of our allocated bounds.
While at it, clean up scoping and prevent unnecessary memset.

Minor fix for 86a9668a8d
"[SCSI] zfcp: support for hardware data router"

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #3.2+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24 12:11:01 +04:00
..
Makefile [SCSI] zfcp: Move code for managing zfcp_unit devices to new file 2010-09-16 22:54:15 -04:00
zfcp_aux.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_ccw.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_cfdc.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_dbf.c [SCSI] zfcp: Bounds checking for deferred error trace 2012-09-24 12:11:01 +04:00
zfcp_dbf.h [SCSI] zfcp: Redesign of the debug tracing final cleanup. 2010-12-21 12:24:46 -06:00
zfcp_def.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_erp.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_ext.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_fc.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_fc.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_fsf.c [SCSI] zfcp: Make trace record tags unique 2012-09-24 12:11:01 +04:00
zfcp_fsf.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_qdio.c [SCSI] zfcp: Bounds checking for deferred error trace 2012-09-24 12:11:01 +04:00
zfcp_qdio.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_reqlist.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_scsi.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_sysfs.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_unit.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00