mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 10:31:08 +00:00
wifi: iwlwifi: debug: fix crash in __iwl_err()
[ Upstream commit634c7b1bd0
] In __iwl_err(), if we rate-limit the message away, then vaf.va is still NULL-initialized by the time we get to the tracing code, which then crashes. When it doesn't get rate-limited out, it's still wrong to reuse the old args2 that was already printed, which is why we bother making a copy in the first place. Assign vaf.va properly to fix this. Fixes:e5f1cc98cc
("iwlwifi: allow rate-limited error messages") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230413102635.e27134c6bcd4.Ib3894cd2ba7a5ad5e75912a7634f146ceaa569e2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6aa401a654
commit
8e5d05ca15
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2011, 2021 Intel Corporation
|
||||
* Copyright (C) 2005-2011, 2021-2022 Intel Corporation
|
||||
*/
|
||||
#include <linux/device.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
@ -57,6 +57,7 @@ void __iwl_err(struct device *dev, enum iwl_err_mode mode, const char *fmt, ...)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
vaf.va = &args;
|
||||
trace_iwlwifi_err(&vaf);
|
||||
va_end(args);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue