Commit e7417421 authored by Johannes Berg's avatar Johannes Berg
Browse files

wifi: ath6kl: remove WARN on bad firmware input



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: default avatar <syzbot+92c6dd14aaa230be6855@syzkaller.appspotmail.com>
Tested-by: default avatar <syzbot+92c6dd14aaa230be6855@syzkaller.appspotmail.com>
Acked-by: default avatarJeff Johnson <jeff.johnson@oss.qualcomm.com>
Link: https://patch.msgid.link/20250617114529.031a677a348e.I58bf1eb4ac16a82c546725ff010f3f0d2b0cca49@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d19bac3d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -87,7 +87,9 @@ int ath6kl_bmi_get_target_info(struct ath6kl *ar,
		 * We need to do some backwards compatibility to make this work.
		 */
		if (le32_to_cpu(targ_info->byte_count) != sizeof(*targ_info)) {
			WARN_ON(1);
			ath6kl_err("mismatched byte count %d vs. expected %zd\n",
				   le32_to_cpu(targ_info->byte_count),
				   sizeof(*targ_info));
			return -EINVAL;
		}