[PATCH 0/2] scsi: qedf: Replace alloction API and add null check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series improves memory safety in the qedf SCSI driver by:

1. Replace kmalloc_array() with kcalloc() to avoid old (dirty) data being
   used/freed.
2. Add a check for "bdt_info". Otherwise, if one of the allocations
   for "cmgr->io_bdt_pool[i]" fails, "bdt_info->bd_tbl" will cause a NULL
   pointer dereference.

### Changelog:
#### v2:
- Replace kzalloc() with kcalloc().

Jiasheng Jiang (2):
  scsi: qedf: Replace kmalloc_array() with kcalloc()
  scsi: qedf: Add check for bdt_info

 drivers/scsi/qedf/qedf_io.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.25.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux