* [PATCH] iwlwifi: avoid crash on unsupported debug collection
@ 2021-02-19 12:35 Johannes Berg
2021-02-19 14:50 ` Kalle Valo
2021-02-22 7:23 ` Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2021-02-19 12:35 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Andy Lavr
From: Johannes Berg <johannes.berg@intel.com>
If the opmode doesn't support debug collection (DVM) then don't
crash, but just skip the callback.
Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
Reported-by: Andy Lavr <andy.lavr@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h
index 868da7e79a45..e6d2e0994317 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h
@@ -205,6 +205,8 @@ static inline void iwl_op_mode_time_point(struct iwl_op_mode *op_mode,
enum iwl_fw_ini_time_point tp_id,
union iwl_dbg_tlv_tp_data *tp_data)
{
+ if (!op_mode || !op_mode->ops || !op_mode->ops->time_point)
+ return;
op_mode->ops->time_point(op_mode, tp_id, tp_data);
}
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: avoid crash on unsupported debug collection
2021-02-19 12:35 [PATCH] iwlwifi: avoid crash on unsupported debug collection Johannes Berg
@ 2021-02-19 14:50 ` Kalle Valo
2021-02-19 19:58 ` Luca Coelho
2021-02-22 7:23 ` Kalle Valo
1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2021-02-19 14:50 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Johannes Berg, Andy Lavr
Johannes Berg <johannes@sipsolutions.net> writes:
> From: Johannes Berg <johannes.berg@intel.com>
>
> If the opmode doesn't support debug collection (DVM) then don't
> crash, but just skip the callback.
>
> Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
> Reported-by: Andy Lavr <andy.lavr@gmail.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Should I take this to wireless-drivers?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: avoid crash on unsupported debug collection
2021-02-19 14:50 ` Kalle Valo
@ 2021-02-19 19:58 ` Luca Coelho
0 siblings, 0 replies; 5+ messages in thread
From: Luca Coelho @ 2021-02-19 19:58 UTC (permalink / raw)
To: Kalle Valo, Johannes Berg; +Cc: linux-wireless, Johannes Berg, Andy Lavr
On Fri, 2021-02-19 at 16:50 +0200, Kalle Valo wrote:
> Johannes Berg <johannes@sipsolutions.net> writes:
>
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > If the opmode doesn't support debug collection (DVM) then don't
> > crash, but just skip the callback.
> >
> > Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
> > Reported-by: Andy Lavr <andy.lavr@gmail.com>
> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>
> Should I take this to wireless-drivers?
Yes, please take this to wireless-drivers. As Johannes said, this
breaks all DVM (older) devices.
--
Luca.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: avoid crash on unsupported debug collection
2021-02-19 12:35 [PATCH] iwlwifi: avoid crash on unsupported debug collection Johannes Berg
2021-02-19 14:50 ` Kalle Valo
@ 2021-02-22 7:23 ` Kalle Valo
2021-02-25 10:43 ` Sedat Dilek
1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2021-02-22 7:23 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Johannes Berg, Andy Lavr
Johannes Berg <johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> If the opmode doesn't support debug collection (DVM) then don't
> crash, but just skip the callback.
>
> Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
> Reported-by: Andy Lavr <andy.lavr@gmail.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Patch applied to wireless-drivers.git, thanks.
4538c5ed0f7e iwlwifi: avoid crash on unsupported debug collection
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210219133506.ecabe285bc7d.I73d230d555c595fa2d9bf284f80078729fe18aa4@changeid/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: avoid crash on unsupported debug collection
2021-02-22 7:23 ` Kalle Valo
@ 2021-02-25 10:43 ` Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2021-02-25 10:43 UTC (permalink / raw)
To: Kalle Valo; +Cc: Johannes Berg, linux-wireless, Johannes Berg, Andy Lavr
On Mon, Feb 22, 2021 at 8:24 AM Kalle Valo <kvalo@codeaurora.org> wrote:
>
> Johannes Berg <johannes@sipsolutions.net> wrote:
>
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > If the opmode doesn't support debug collection (DVM) then don't
> > crash, but just skip the callback.
> >
> > Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
> > Reported-by: Andy Lavr <andy.lavr@gmail.com>
> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>
> Patch applied to wireless-drivers.git, thanks.
>
> 4538c5ed0f7e iwlwifi: avoid crash on unsupported debug collection
>
Thanks for the patch.
I have seen a call-trace with my first build of Linux v5.11-10201-gc03c21ba6f4e.
After application - all good.
[ dmesg ]
[ 44.744486] iwlwifi 0000:01:00.0: Detected Intel(R) Centrino(R)
Advanced-N 6230 AGN, REV=0xB0
[ lsmod ]
$ sudo lsmod | grep iwl | sort
cfg80211 1200128 3 iwldvm,iwlwifi,mac80211
iwldvm 176128 0
iwlwifi 348160 1 iwldvm
mac80211 1167360 1 iwldvm
- Sedat -
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-25 10:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 12:35 [PATCH] iwlwifi: avoid crash on unsupported debug collection Johannes Berg
2021-02-19 14:50 ` Kalle Valo
2021-02-19 19:58 ` Luca Coelho
2021-02-22 7:23 ` Kalle Valo
2021-02-25 10:43 ` Sedat Dilek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).