Whamcloud - gitweb
LU-7988 hsm: Fix possible out of bounds reference in message
In the "Cannot allocate memory" error message, request[i].hal_sz could
be out of bound if the value of i was hsd->max_requests, which is
likely. The short fix would have been to use
request[empty_slot].hal_sz. Instead use a local variable for the
current request. This also reduces the size of the code.
Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I324087117df284dacea25774ebd9d4ed04794cbc
Reviewed-on: http://review.whamcloud.com/19579
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Vinayak <vinayakswami.hariharmath@seagate.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>