* Patch "rtlwifi: rtl_pci_probe: Fix fail path of _rtl_pci_find_adapter" has been added to the 4.13-stable tree
@ 2017-09-07 14:48 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-09-07 14:48 UTC (permalink / raw)
To: tvboxspy, gregkh, kvalo; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
rtlwifi: rtl_pci_probe: Fix fail path of _rtl_pci_find_adapter
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rtlwifi-rtl_pci_probe-fix-fail-path-of-_rtl_pci_find_adapter.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From fc81bab5eeb103711925d7510157cf5cd2b153f4 Mon Sep 17 00:00:00 2001
From: Malcolm Priestley <tvboxspy@gmail.com>
Date: Sun, 30 Jul 2017 09:02:19 +0100
Subject: rtlwifi: rtl_pci_probe: Fix fail path of _rtl_pci_find_adapter
From: Malcolm Priestley <tvboxspy@gmail.com>
commit fc81bab5eeb103711925d7510157cf5cd2b153f4 upstream.
_rtl_pci_find_adapter fail path will jump to label fail3 for
unsupported adapter types.
However, on course for fail3 there will be call rtl_deinit_core
before rtl_init_core.
For the inclusion of checking pci_iounmap this fail can be moved to
fail2.
Fixes
[ 4.492963] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 4.493067] IP: rtl_deinit_core+0x31/0x90 [rtlwifi]
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/realtek/rtlwifi/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -2257,7 +2257,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
/* find adapter */
if (!_rtl_pci_find_adapter(pdev, hw)) {
err = -ENODEV;
- goto fail3;
+ goto fail2;
}
/* Init IO handler */
@@ -2318,10 +2318,10 @@ fail3:
pci_set_drvdata(pdev, NULL);
rtl_deinit_core(hw);
+fail2:
if (rtlpriv->io.pci_mem_start != 0)
pci_iounmap(pdev, (void __iomem *)rtlpriv->io.pci_mem_start);
-fail2:
pci_release_regions(pdev);
complete(&rtlpriv->firmware_loading_complete);
Patches currently in stable-queue which might be from tvboxspy@gmail.com are
queue-4.13/rtlwifi-rtl_pci_probe-fix-fail-path-of-_rtl_pci_find_adapter.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-07 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07 14:48 Patch "rtlwifi: rtl_pci_probe: Fix fail path of _rtl_pci_find_adapter" has been added to the 4.13-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).