[PATCH] ath6kl: fix struct hif_scatter_req list handling
Kalle Valo
kvalo at qca.qualcomm.com
Thu Mar 13 01:20:33 EDT 2014
Kalle Valo <kvalo at qca.qualcomm.com> writes:
> Jason noticed that with Yocto GCC 4.8.1 ath6kl crashes with this iperf command:
>
> iperf -c $TARGET_IP -i 5 -t 50 -w 1M
>
> The crash was:
>
[...]
> ---[ end trace 0c038f0b8e0b67a3 ]---
> Kernel panic - not syncing: Fatal exception
>
> Jason's analysis:
>
>
> "The GCC 4.8.1 compiler will not do the for-loop till scat_entries, instead,
> it only run one round loop. This may be caused by that the GCC 4.8.1 thought
> that the scat_list only have one item and then no need to do full iteration,
> but this is simply wrong by looking at the assebly code. This will cause the sg
> buffer not get set when scat_entries > 1 and thus lead to kernel panic.
>
> Note: This issue not observed with GCC 4.7.2, only found on the GCC 4.8.1)"
>
> Fix this by using the normal [0] style for defining unknown number of list
> entries following the struct. This also fixes corruption with scat_q_depth, which
> was mistankely added to the end of struct and overwritten if there were more
> than item in the scat list.
>
> Reported-by: Jason Liu <r64343 at freescale.com>
> Tested-by: Jason Liu <r64343 at freescale.com>
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
Applied.
--
Kalle Valo
More information about the ath6kl
mailing list