scsi: dpt_i2o: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Wed, 2 May 2018 22:21:38 +0000 (15:21 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 16:03:51 +0000 (12:03 -0400)
commit60d6d22d85a79d194e9e1a13b831ffafa741cd6e
treec89d901180c6e9fd625925907871a9b6d766f758
parent092b45583c524edac688f0b6cdc62a70c3081e4a
scsi: dpt_i2o: Remove VLA usage

On the quest to remove all VLAs from the kernel[1] this moves the
sg_list variable off the stack, as already done for other allocated
buffers in adpt_i2o_passthru(). Additionally consolidates the error path
for kfree().

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/dpt_i2o.c