From: Kalle Valo <kvalo@codeaurora.org>
To: Wen Gong <wgong@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org
Subject: Re: [PATCH] ath11k: add ieee80211_unregister_hw to avoid kernel crash caused by NULL pointer
Date: Mon, 18 Jan 2021 18:38:17 +0200 [thread overview]
Message-ID: <87turefbeu.fsf@codeaurora.org> (raw)
In-Reply-To: <1608607824-16067-1-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Tue, 22 Dec 2020 11:30:24 +0800")
Wen Gong <wgong@codeaurora.org> writes:
> When function return fail to __ath11k_mac_register after success called
> ieee80211_register_hw, then it set wiphy->dev.parent to NULL by
> SET_IEEE80211_DEV(ar->hw, NULL) in end of __ath11k_mac_register, then
> cfg80211_get_drvinfo will be called by below call stack, but the
> wiphy->dev.parent is NULL, so kernel crash.
[...]
> +err_unregister_hw:
> + ieee80211_unregister_hw(ar->hw);
> +
> err_free_if_combs:
> kfree(ar->hw->wiphy->iface_combinations[0].limits);
> kfree(ar->hw->wiphy->iface_combinations);
Incorrect indentation, I'm surprised checkpatch doesn't catch that. But
fixed this in the pending branch.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Wen Gong <wgong@codeaurora.org>
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath11k: add ieee80211_unregister_hw to avoid kernel crash caused by NULL pointer
Date: Mon, 18 Jan 2021 18:38:17 +0200 [thread overview]
Message-ID: <87turefbeu.fsf@codeaurora.org> (raw)
In-Reply-To: <1608607824-16067-1-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Tue, 22 Dec 2020 11:30:24 +0800")
Wen Gong <wgong@codeaurora.org> writes:
> When function return fail to __ath11k_mac_register after success called
> ieee80211_register_hw, then it set wiphy->dev.parent to NULL by
> SET_IEEE80211_DEV(ar->hw, NULL) in end of __ath11k_mac_register, then
> cfg80211_get_drvinfo will be called by below call stack, but the
> wiphy->dev.parent is NULL, so kernel crash.
[...]
> +err_unregister_hw:
> + ieee80211_unregister_hw(ar->hw);
> +
> err_free_if_combs:
> kfree(ar->hw->wiphy->iface_combinations[0].limits);
> kfree(ar->hw->wiphy->iface_combinations);
Incorrect indentation, I'm surprised checkpatch doesn't catch that. But
fixed this in the pending branch.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2021-01-18 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 3:30 [PATCH] ath11k: add ieee80211_unregister_hw to avoid kernel crash caused by NULL pointer Wen Gong
2020-12-22 3:30 ` Wen Gong
2021-01-18 16:38 ` Kalle Valo [this message]
2021-01-18 16:38 ` Kalle Valo
2021-01-26 16:05 ` Kalle Valo
2021-01-26 16:05 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87turefbeu.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=wgong@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.