scsi: megaraid_sas: fix panic on loading firmware crashdump
authorJunxiao Bi <junxiao.bi@oracle.com>
Mon, 22 Jul 2019 16:15:24 +0000 (09:15 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Jul 2019 02:14:06 +0000 (22:14 -0400)
commit3b5f307ef3cb5022bfe3c8ca5b8f2114d5bf6c29
tree67790f64114d0ea270b39b3bb64ed7722771a311
parent359603a3847e58843881db87e5f464bb85539e95
scsi: megaraid_sas: fix panic on loading firmware crashdump

While loading fw crashdump in function fw_crash_buffer_show(), left bytes
in one dma chunk was not checked, if copying size over it, overflow access
will cause kernel panic.

Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c