Skip to content

Commit 89bd133

Browse files
jmberg-intelgregkh
authored andcommitted
wifi: ath6kl: remove WARN on bad firmware input
[ Upstream commit e7417421d89358da071fd2930f91e67c7128fbff ] If the firmware gives bad input, that's nothing to do with the driver's stack at this point etc., so the WARN_ON() doesn't add any value. Additionally, this is one of the top syzbot reports now. Just print a message, and as an added bonus, print the sizes too. Reported-by: [email protected] Tested-by: [email protected] Acked-by: Jeff Johnson <[email protected]> Link: https://patch.msgid.link/20250617114529.031a677a348e.I58bf1eb4ac16a82c546725ff010f3f0d2b0cca49@changeid Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 7b131d8 commit 89bd133

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/ath/ath6kl

1 file changed

+3
-1
lines changed

drivers/net/wireless/ath/ath6kl/bmi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ int ath6kl_bmi_get_target_info(struct ath6kl *ar,
8787
* We need to do some backwards compatibility to make this work.
8888
*/
8989
if (le32_to_cpu(targ_info->byte_count) != sizeof(*targ_info)) {
90-
WARN_ON(1);
90+
ath6kl_err("mismatched byte count %d vs. expected %zd\n",
91+
le32_to_cpu(targ_info->byte_count),
92+
sizeof(*targ_info));
9193
return -EINVAL;
9294
}
9395

0 commit comments

Comments
 (0)