All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* bug in commit: mac80211: Fix possible sband related NULL pointer de-reference
@ 2017-11-17 22:30 Ben Greear
  2017-11-17 23:09 ` Ben Greear
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Greear @ 2017-11-17 22:30 UTC (permalink / raw
  To: Mohammed Shafi Shajakhan, linux-wireless@vger.kernel.org

Author: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Date:   Thu Apr 27 12:45:38 2017 +0530

     mac80211: Fix possible sband related NULL pointer de-reference

     Existing API 'ieee80211_get_sdata_band' returns default 2 GHz band even
     if the channel context configuration is NULL. This crashes for chipsets
     which support 5 Ghz alone when it tries to access members of 'sband'.
     Channel context configuration can be NULL in multivif case and when
     channel switch is in progress (or) when it fails. Fix this by replacing
     the API 'ieee80211_get_sdata_band' with  'ieee80211_get_sband' which
     returns a NULL pointer for sband when the channel configuration is NULL.

...

This commit appears to break  sta_set_rate_info_tx on drivers that are not using chantx,
because it calls ieee80211_get_sband, which does a WARN_ON when there is no chantx.

Any idea how to make this work for chandef drivers?

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug in commit: mac80211: Fix possible sband related NULL pointer de-reference
  2017-11-17 22:30 bug in commit: mac80211: Fix possible sband related NULL pointer de-reference Ben Greear
@ 2017-11-17 23:09 ` Ben Greear
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Greear @ 2017-11-17 23:09 UTC (permalink / raw
  To: Mohammed Shafi Shajakhan, linux-wireless@vger.kernel.org

On 11/17/2017 02:30 PM, Ben Greear wrote:
> Author: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> Date:   Thu Apr 27 12:45:38 2017 +0530
>
>     mac80211: Fix possible sband related NULL pointer de-reference
>
>     Existing API 'ieee80211_get_sdata_band' returns default 2 GHz band even
>     if the channel context configuration is NULL. This crashes for chipsets
>     which support 5 Ghz alone when it tries to access members of 'sband'.
>     Channel context configuration can be NULL in multivif case and when
>     channel switch is in progress (or) when it fails. Fix this by replacing
>     the API 'ieee80211_get_sdata_band' with  'ieee80211_get_sband' which
>     returns a NULL pointer for sband when the channel configuration is NULL.
>
> ...
>
> This commit appears to break  sta_set_rate_info_tx on drivers that are not using chantx,
> because it calls ieee80211_get_sband, which does a WARN_ON when there is no chantx.
>
> Any idea how to make this work for chandef drivers?

Maybe there are other issues in my case.  I'll test out a patch to make it WARN_ON_ONCE
and submit once I get some other problems ironed out.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-17 23:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 22:30 bug in commit: mac80211: Fix possible sband related NULL pointer de-reference Ben Greear
2017-11-17 23:09 ` Ben Greear

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.