nvme: Fix discard buffer overrun

This patch checks the discard range array bounds before setting it in
case the driver gets a badly formed request.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
This commit is contained in:
Keith Busch 2018-01-31 17:01:58 -07:00 • committed by Sagi Grimberg
commit 8cb6af7b3a