[SCSI] hpsa: cap CCISS_PASSTHRU at 20 concurrent commands.
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Mon, 23 Sep 2013 18:34:12 +0000 (13:34 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 19 Dec 2013 15:38:56 +0000 (07:38 -0800)
commit0390f0c0dfb540149d7369276b17ec53caf506cb
tree2a621fff7b52ca27a9e1a66c168b940d599222f2
parente06c8e5c34498d1ea0468401012be8d1c853c585
[SCSI] hpsa: cap CCISS_PASSTHRU at 20 concurrent commands.

Cap CCISS_BIG_PASSTHRU as well.  If an attempt is made
to exceed this, ioctl() will return -1 with errno == EAGAIN.

This is to prevent a userland program from exhausting all of
pci_alloc_consistent memory.  I've only seen this problem when
running a special test program designed to provoke it.  20
concurrent commands via the passthru ioctls (not counting SG_IO)
should be more than enough.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hpsa.c
drivers/scsi/hpsa.h