提交 c2e27e16 编写于 作者: J Johannes Berg 提交者: Luca Coelho

iwlwifi: mvm: properly check for transport data in dump

When copying from vmalloc'ed memory to the SG list, don't crash
if the transport didn't provide any data.

Fixes: 7e62a699 ("iwlwifi: mvm: use dev_coredumpsg()")
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 5bdaa0ef
......@@ -848,6 +848,7 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
sg_nents(sg_dump_data),
fw_error_dump->op_mode_ptr,
fw_error_dump->op_mode_len, 0);
if (fw_error_dump->trans_ptr)
sg_pcopy_from_buffer(sg_dump_data,
sg_nents(sg_dump_data),
fw_error_dump->trans_ptr->data,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册