NACK: [Xenial][PATCH 1/2] net/wireless: do not dereference invalid pointer
Stefan Bader
stefan.bader at canonical.com
Thu Aug 24 08:00:09 UTC 2017
On 24.08.2017 09:30, Wen-chien Jesse Sung wrote:
> BugLink: https://launchpad.net/bugs/1712746
>
No SRU justification in bug report.
> The wiphy may be NULL sometimes. Do not dereference when it's NULL.
>
No source quoted. Cherry-picked? From where? Possibly needed in Zesty, too?
-Stefan
> Signed-off-by: Wen-chien Jesse Sung <jesse.sung at canonical.com>
> ---
> 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 baf7218..e358511 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->bands[band];
> + sband = wiphy ? wiphy->bands[band] : NULL;
>
> if (!sband)
> continue;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20170824/698fe117/attachment.sig>
More information about the kernel-team
mailing list