+ drivers-scsi-ufs-fix-potential-null-pointer-dereferencing-error-in-ufshcd_probe.patch added to -mm tree

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

 



The patch titled
     Subject: drivers/scsi/ufs: fix potential NULL pointer dereferencing error in ufshcd_probe()
has been added to the -mm tree.  Its filename is
     drivers-scsi-ufs-fix-potential-null-pointer-dereferencing-error-in-ufshcd_probe.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Namjae Jeon <linkinjeon@xxxxxxxxx>
Subject: drivers/scsi/ufs: fix potential NULL pointer dereferencing error in ufshcd_probe()

Avoid dereferencing a NULL pointer if scsi_host_alloc() failed.

Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxx>
Acked-by: Santosh Y <santoshsy@xxxxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/scsi/ufs/ufshcd.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/scsi/ufs/ufshcd.c~drivers-scsi-ufs-fix-potential-null-pointer-dereferencing-error-in-ufshcd_probe drivers/scsi/ufs/ufshcd.c
--- a/drivers/scsi/ufs/ufshcd.c~drivers-scsi-ufs-fix-potential-null-pointer-dereferencing-error-in-ufshcd_probe
+++ a/drivers/scsi/ufs/ufshcd.c
@@ -1838,7 +1838,7 @@ ufshcd_probe(struct pci_dev *pdev, const
 	err = pci_request_regions(pdev, UFSHCD);
 	if (err < 0) {
 		dev_err(&pdev->dev, "request regions failed\n");
-		goto out_disable;
+		goto out_host_put;
 	}
 
 	hba->mmio_base = pci_ioremap_bar(pdev, 0);
@@ -1927,8 +1927,9 @@ out_iounmap:
 	iounmap(hba->mmio_base);
 out_release_regions:
 	pci_release_regions(pdev);
-out_disable:
+out_host_put:
 	scsi_host_put(host);
+out_disable:
 	pci_clear_master(pdev);
 	pci_disable_device(pdev);
 out_error:
_
Subject: Subject: drivers/scsi/ufs: fix potential NULL pointer dereferencing error in ufshcd_probe()

Patches currently in -mm which might be from linkinjeon@xxxxxxxxx are

origin.patch
linux-next.patch
drivers-scsi-ufs-reverse-the-ufshcd_is_device_present-logic.patch
ufs-fix-incorrect-return-value-about-success-and-failed.patch
drivers-scsi-ufs-fix-potential-null-pointer-dereferencing-error-in-ufshcd_probe.patch
fat-add-fat_msg_ratelimit.patch
fat-use-fat_msg_ratelimit-in-fat__get_entry.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux