Commit 93a91f4
wifi: ath11k: fix double free of peer rx_tid during reo cmd failure
Peer rx_tid is locally copied thrice during peer_rx_tid_cleanup to
send REO_CMD_UPDATE_RX_QUEUE followed by REO_CMD_FLUSH_CACHE to flush
all aged REO descriptors from HW cache.
When sending REO_CMD_FLUSH_CACHE fails, we do dma unmap of already
mapped rx_tid->vaddr and free it. This is not checked during
reo_cmd_list_cleanup() and dp_reo_cmd_free() before trying to free and
unmap again.
Fix this by setting rx_tid->vaddr NULL in rx tid delete and also
wherever freeing it to check in reo_cmd_list_cleanup() and
reo_cmd_free() before trying to free again.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230403182420.23375-2-quic_hprem@quicinc.com1 parent ed09c61 commit 93a91f4
1 file changed
Lines changed: 31 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
| 671 | + | |
671 | 672 | | |
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
675 | | - | |
676 | | - | |
677 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
678 | 683 | | |
679 | 684 | | |
680 | 685 | | |
681 | 686 | | |
682 | 687 | | |
683 | 688 | | |
684 | 689 | | |
685 | | - | |
686 | | - | |
687 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
688 | 697 | | |
689 | 698 | | |
690 | 699 | | |
| |||
698 | 707 | | |
699 | 708 | | |
700 | 709 | | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
705 | 716 | | |
706 | 717 | | |
707 | 718 | | |
| |||
740 | 751 | | |
741 | 752 | | |
742 | 753 | | |
| 754 | + | |
743 | 755 | | |
744 | 756 | | |
745 | 757 | | |
| |||
792 | 804 | | |
793 | 805 | | |
794 | 806 | | |
| 807 | + | |
795 | 808 | | |
796 | 809 | | |
797 | 810 | | |
| |||
804 | 817 | | |
805 | 818 | | |
806 | 819 | | |
| 820 | + | |
| 821 | + | |
807 | 822 | | |
808 | 823 | | |
809 | 824 | | |
| |||
818 | 833 | | |
819 | 834 | | |
820 | 835 | | |
| 836 | + | |
821 | 837 | | |
822 | 838 | | |
823 | | - | |
| 839 | + | |
| 840 | + | |
824 | 841 | | |
825 | 842 | | |
826 | 843 | | |
| |||
967 | 984 | | |
968 | 985 | | |
969 | 986 | | |
| 987 | + | |
970 | 988 | | |
971 | 989 | | |
972 | 990 | | |
| |||
1067 | 1085 | | |
1068 | 1086 | | |
1069 | 1087 | | |
1070 | | - | |
| 1088 | + | |
| 1089 | + | |
1071 | 1090 | | |
1072 | 1091 | | |
1073 | 1092 | | |
| |||
0 commit comments