]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[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>
Mon, 16 Dec 2013 18:57:54 +0000 (10:57 -0800)
commit1db31d778d962b1477bcfc71161e8a1d5ffc4fdd
tree0135280b4bc73e148af9ef9c6b304c15e090cbac
parent6b9740ac806066167f2851cb50027b7fef934a1d
[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