linux/drivers/scsi/arcmsr
Borislav Petkov 4bd173c307 scsi: arcmsr: Simplify user_len checking
Do the user_len check first and then the ver_addr allocation so that we
can save us the kfree() on the error path when user_len is >
ARCMSR_API_DATA_BUFLEN.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Marco Grassi <marco.gra@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Tomas Henzl <thenzl@redhat.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-09-26 21:02:51 -04:00
..
arcmsr_attr.c arcmsr: simplify ioctl data read/write 2014-09-25 14:23:40 +02:00
arcmsr_hba.c scsi: arcmsr: Simplify user_len checking 2016-09-26 21:02:51 -04:00
arcmsr.h arcmsr: change driver version to v1.30.00.22-20151126 2015-11-30 18:51:20 -05:00
Makefile