]> git.baikalelectronics.ru Git - kernel.git/commit
isci: preallocate remote devices
authorDan Williams <dan.j.williams@intel.com>
Fri, 4 Mar 2011 01:59:32 +0000 (17:59 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 10:55:29 +0000 (03:55 -0700)
commit131b9649eec6a3c90f03f38add2940a7fce8effe
tree508f28b5b88348b2d989f479442cbd6813bd2b42
parent908d640cafa1c5bb6ec61dd2ac69b677878fbc00
isci: preallocate remote devices

Until we synchronize against device removal this limits the damage of
use after free bugs to the driver's own objects.  Unless we implement
reference counting we need to ensure at least a subset of a remote
device is valid at all times.  We follow the lead of other libsas
drivers that also preallocate devices.

This also enforces maximum remote device accounting at the lldd layer,
but the core may still run out of RNC's before we hit this limit.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/isci/host.c
drivers/scsi/isci/host.h
drivers/scsi/isci/init.c
drivers/scsi/isci/isci.h
drivers/scsi/isci/remote_device.c
drivers/scsi/isci/remote_device.h