[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200616153107.452221697@linuxfoundation.org>
Date: Tue, 16 Jun 2020 17:33:32 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Jérôme Pouiller
<jerome.pouiller@...abs.com>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.6 022/161] staging: wfx: fix double free
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
[ Upstream commit 832cc98141b4b93acbb9231ca9e36f7fbe347f47 ]
In case of error in wfx_probe(), wdev->hw is freed. Since an error
occurred, wfx_free_common() is called, then wdev->hw is freed again.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
Reviewed-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Fixes: 4033714d6cbe ("staging: wfx: fix init/remove vs IRQ race")
Link: https://lore.kernel.org/r/20200505123757.39506-4-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/staging/wfx/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
index 76b2ff7fc7fe..2c757b81efa9 100644
--- a/drivers/staging/wfx/main.c
+++ b/drivers/staging/wfx/main.c
@@ -466,7 +466,6 @@ int wfx_probe(struct wfx_dev *wdev)
err2:
ieee80211_unregister_hw(wdev->hw);
- ieee80211_free_hw(wdev->hw);
err1:
wfx_bh_unregister(wdev);
return err;
--
2.25.1
Powered by blists - more mailing lists