[Xenial][PATCH v2 0/3] a fix for mwifiex

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Xenial][PATCH v2 0/3] a fix for mwifiex

Wen-chien Jesse Sung
BugLink: https://launchpad.net/bugs/1769671

There were two workaround appied for lp:1712746 and now that the
fix from Marvell has been accepted by upstream, it's time to integrate
the fix instead.

There are three patches in this series: two for reverting the workaround
patches, and one to apply the fix.

The fix has been verified on real hardware.

Changes in v2:
* Create a new LP bug and update the BugLink.


Limin Zhu (1):
  mwifiex: cfg80211: do not change virtual interface during scan
    processing

Wen-chien Jesse Sung (2):
  Revert "UBUNTU: SAUCE: mwifiex: do not dereference invalid pointer"
  Revert "UBUNTU: SAUCE: net/wireless: do not dereference invalid
    pointer"

 drivers/net/wireless/mwifiex/cfg80211.c | 6 ++++++
 drivers/net/wireless/mwifiex/cfp.c      | 4 +---
 net/wireless/util.c                     | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

--
2.17.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Xenial][PATCH v2 1/3] Revert "UBUNTU: SAUCE: mwifiex: do not dereference invalid pointer"

Wen-chien Jesse Sung
BugLink: https://launchpad.net/bugs/1769671

This reverts the workaround commit 8a034f97a28dba62026343eef7992766c91273a7
for integrating the fix.

Signed-off-by: Wen-chien Jesse Sung <[hidden email]>
---
 drivers/net/wireless/mwifiex/cfp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c
index 47eb72546272..09fae27140f7 100644
--- a/drivers/net/wireless/mwifiex/cfp.c
+++ b/drivers/net/wireless/mwifiex/cfp.c
@@ -324,9 +324,7 @@ mwifiex_get_cfp(struct mwifiex_private *priv, u8 band, u16 channel, u32 freq)
  if (mwifiex_band_to_radio_type(band) == HostCmd_SCAN_RADIO_TYPE_BG)
  sband = priv->wdev.wiphy->bands[IEEE80211_BAND_2GHZ];
  else
- sband = priv->wdev.wiphy ?
- priv->wdev.wiphy->bands[IEEE80211_BAND_5GHZ] :
- NULL;
+ sband = priv->wdev.wiphy->bands[IEEE80211_BAND_5GHZ];
 
  if (!sband) {
  mwifiex_dbg(priv->adapter, ERROR,
--
2.17.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Xenial][PATCH v2 2/3] Revert "UBUNTU: SAUCE: net/wireless: do not dereference invalid pointer"

Wen-chien Jesse Sung
In reply to this post by Wen-chien Jesse Sung
BugLink: https://launchpad.net/bugs/1769671

This reverts the workaround commit f21d12781c88413aec7ee44983f05b1cdf90662f
for integrating the fix.

Signed-off-by: Wen-chien Jesse Sung <[hidden email]>
---
 net/wireless/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index e358511f1120..baf7218cec15 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -121,7 +121,7 @@ struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
  int i;
 
  for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
- sband = wiphy ? wiphy->bands[band] : NULL;
+ sband = wiphy->bands[band];
 
  if (!sband)
  continue;
--
2.17.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Xenial][PATCH v2 3/3] mwifiex: cfg80211: do not change virtual interface during scan processing

Wen-chien Jesse Sung
In reply to this post by Wen-chien Jesse Sung
From: Limin Zhu <[hidden email]>

BugLink: https://launchpad.net/bugs/1769671

(1) Change virtual interface operation in cfg80211 process reset and
reinitilize private data structure.
(2) Scan result event processed in main process will dereference private
data structure concurrently, ocassionly crash the kernel.

The cornel case could be trigger by below steps:
(1) wpa_cli mlan0 scan
(2) ./hostapd mlan0.conf

Cfg80211 asynchronous scan procedure is not all the time operated
under rtnl lock, here we add the protect to serialize the cfg80211
scan and change_virtual interface operation.

Signed-off-by: Limin Zhu <[hidden email]>
Signed-off-by: Xinming Hu <[hidden email]>
Signed-off-by: Kalle Valo <[hidden email]>
(backported from commit c61cfe49f0f0f0d1f8b56d0b045838d597e8c3a3)
Signed-off-by: Wen-chien Jesse Sung <[hidden email]>
---
 drivers/net/wireless/mwifiex/cfg80211.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index cc50ca67cca9..1d35c227df52 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1056,6 +1056,12 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
  struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
  enum nl80211_iftype curr_iftype = dev->ieee80211_ptr->iftype;
 
+ if (priv->scan_request) {
+ mwifiex_dbg(priv->adapter, ERROR,
+    "change virtual interface: scan in process\n");
+ return -EBUSY;
+ }
+
  switch (curr_iftype) {
  case NL80211_IFTYPE_ADHOC:
  switch (type) {
--
2.17.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [Xenial][PATCH v2 0/3] a fix for mwifiex

Kleber Souza
In reply to this post by Wen-chien Jesse Sung
On 05/07/18 16:11, Wen-chien Jesse Sung wrote:

> BugLink: https://launchpad.net/bugs/1769671
>
> There were two workaround appied for lp:1712746 and now that the
> fix from Marvell has been accepted by upstream, it's time to integrate
> the fix instead.
>
> There are three patches in this series: two for reverting the workaround
> patches, and one to apply the fix.
>
> The fix has been verified on real hardware.
>
> Changes in v2:
> * Create a new LP bug and update the BugLink.
>
>
> Limin Zhu (1):
>   mwifiex: cfg80211: do not change virtual interface during scan
>     processing
>
> Wen-chien Jesse Sung (2):
>   Revert "UBUNTU: SAUCE: mwifiex: do not dereference invalid pointer"
>   Revert "UBUNTU: SAUCE: net/wireless: do not dereference invalid
>     pointer"
>
>  drivers/net/wireless/mwifiex/cfg80211.c | 6 ++++++
>  drivers/net/wireless/mwifiex/cfp.c      | 4 +---
>  net/wireless/util.c                     | 2 +-
>  3 files changed, 8 insertions(+), 4 deletions(-)
>

Hi Jesse,

Thank you for filing a new bug and sending a v2.


Acked-by: Kleber Sacilotto de Souza <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [Xenial][PATCH v2 0/3] a fix for mwifiex

Po-Hsu Lin (Sam)
In reply to this post by Wen-chien Jesse Sung
Acked-by: Po-Hsu Lin <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [Xenial][PATCH v2 0/3] a fix for mwifiex

Kleber Souza
In reply to this post by Wen-chien Jesse Sung
On 05/07/18 16:11, Wen-chien Jesse Sung wrote:

> BugLink: https://launchpad.net/bugs/1769671
>
> There were two workaround appied for lp:1712746 and now that the
> fix from Marvell has been accepted by upstream, it's time to integrate
> the fix instead.
>
> There are three patches in this series: two for reverting the workaround
> patches, and one to apply the fix.
>
> The fix has been verified on real hardware.
>
> Changes in v2:
> * Create a new LP bug and update the BugLink.
>
>
> Limin Zhu (1):
>   mwifiex: cfg80211: do not change virtual interface during scan
>     processing
>
> Wen-chien Jesse Sung (2):
>   Revert "UBUNTU: SAUCE: mwifiex: do not dereference invalid pointer"
>   Revert "UBUNTU: SAUCE: net/wireless: do not dereference invalid
>     pointer"
>
>  drivers/net/wireless/mwifiex/cfg80211.c | 6 ++++++
>  drivers/net/wireless/mwifiex/cfp.c      | 4 +---
>  net/wireless/util.c                     | 2 +-
>  3 files changed, 8 insertions(+), 4 deletions(-)
>

Applied to xenial/master-next branch.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team