[PATCH 0/9] mmc: fix return value check of mmc_add_host()

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

 



mmc_add_host() may return error, but it was ignored in some drivers, if we
ignore it, the memory that allocated in mmc_alloc_host() will be leaked and
it will lead a kernel crash because of deleting not added device in the remove
path.

So fix this by checking the return value and calling mmc_free_host() in error
path.

Yang Yingliang (9):
  mmc: alcor: fix return value check of mmc_add_host()
  mmc: moxart: fix return value check of mmc_add_host()
  mmc: mxcmmc: fix return value check of mmc_add_host()
  mmc: pxamci: fix return value check of mmc_add_host()
  mmc: rtsx_pci: fix return value check of mmc_add_host()
  mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()
  mmc: toshsd: fix return value check of mmc_add_host()
  mmc: vub300: fix return value check of mmc_add_host()
  mmc: wmt-sdmmc: fix return value check of mmc_add_host()

 drivers/mmc/host/alcor.c          |  5 ++++-
 drivers/mmc/host/moxart-mmc.c     |  4 +++-
 drivers/mmc/host/mxcmmc.c         |  4 +++-
 drivers/mmc/host/pxamci.c         |  7 ++++++-
 drivers/mmc/host/rtsx_pci_sdmmc.c |  9 ++++++++-
 drivers/mmc/host/rtsx_usb_sdmmc.c | 11 ++++++++++-
 drivers/mmc/host/toshsd.c         |  6 +++++-
 drivers/mmc/host/vub300.c         | 11 ++++++++---
 drivers/mmc/host/wmt-sdmmc.c      |  6 +++++-
 9 files changed, 52 insertions(+), 11 deletions(-)

-- 
2.25.1




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux