[SCSI] advansys: Fix simultaneous calls to ->queuecommand
authorMatthew Wilcox <matthew@wil.cx>
Wed, 3 Oct 2007 01:55:25 +0000 (21:55 -0400)
committerJames Bottomley <jejb@mulgrave.localdomain>
Fri, 12 Oct 2007 18:53:02 +0000 (14:53 -0400)
commit05848b6e66ee237c4496c2b49821d2622b0f677e
tree49055abae9e9387934be0734aa8ff3eb3ee4664d
parent41d2493d3478942f891b21dff60951ff939c08d9
[SCSI] advansys: Fix simultaneous calls to ->queuecommand

The narrow board used two global structures to set up a command;
unfortunately they weren't locked, so with two boards in the machine,
one call to queuecommand could corrupt the data being used by the other
call to queuecommand.

Fix this by allocating asc_scsi_q on the stack (64 bytes) and using kmalloc
for the asc_sg_head (2k)

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/advansys.c