kernel_optimize_test/drivers/scsi/megaraid
Takashi Iwai ff33d0e2b9 scsi: megaraid_sas: Use scnprintf() for avoiding potential buffer overflow
Since snprintf() returns the would-be-output size instead of the actual
output size, the succeeding calls may go beyond the given buffer limit.
Fix it by replacing with scnprintf().

Also corrected the wrongly passed limit size.  The remaining buffer size
must be decremented.

Link: https://lore.kernel.org/r/20200315094241.9086-7-tiwai@suse.de
Cc: "James E . J . Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-03-17 13:36:12 -04:00
..
Kconfig.megaraid SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
Makefile scsi: megaraid_sas: Export RAID map through debugfs 2019-06-18 19:46:20 -04:00
mbox_defs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mega_common.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
megaraid_ioctl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
megaraid_mbox.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
megaraid_mbox.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
megaraid_mm.c compat_ioctl: use correct compat_ptr() translation in drivers 2019-10-23 17:23:44 +02:00
megaraid_mm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
megaraid_sas_base.c scsi: megaraid_sas: Use scnprintf() for avoiding potential buffer overflow 2020-03-17 13:36:12 -04:00
megaraid_sas_debugfs.c scsi: megaraid_sas: Remove unused including <linux/version.h> 2019-06-18 19:46:25 -04:00
megaraid_sas_fp.c scsi: megaraid_sas: remove unused variables 'debugBlk','fusion' 2019-10-09 23:33:14 -04:00
megaraid_sas_fusion.c scsi: megaraid_sas: Use Block layer API to check SCSI device in-flight IO requests 2020-01-15 23:21:03 -05:00
megaraid_sas_fusion.h scsi: megaraid_sas: Do not initiate OCR if controller is not in ready state 2020-01-15 23:21:03 -05:00
megaraid_sas.h scsi: megaraid_sas: Update driver version to 07.713.01.00-rc1 2020-01-15 23:21:03 -05:00