]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[SCSI] libiscsi: fix senselen calculation
authorMike Christie <michaelc@cs.wisc.edu>
Sun, 17 Dec 2006 18:10:28 +0000 (12:10 -0600)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 6 Jan 2007 15:02:09 +0000 (09:02 -0600)
commit9b80cb4be1f4181875e0cf274dc59f42964fdf1b
tree37587f07724c7382547f056e54e8a52e6e84a594
parent94cb3f822bb806a750e1e1c8457bee6e96671569
[SCSI] libiscsi: fix senselen calculation

Yanling Qi, noted that when the sense data length of
a check-condition is greater than 0x7f (127), senselen = (data[0] << 8)
| data[1] will become negative. It causes different kinds of panics from
GPF, spin_lock deadlock to spin_lock recursion.

We were also swapping this value on big endien machines.

This patch fixes both issues by using be16_to_cpu().

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/libiscsi.c