Commit db1b4be
net: ethernet: mtk_wed: fix use-after-free panic in mtk_wed_setup_tc_block_cb()
When there are multiple ap interfaces on one band and with WED on,
turning the interface down will cause a kernel panic on MT798X.
Previously, cb_priv was freed in mtk_wed_setup_tc_block() without
marking NULL,and mtk_wed_setup_tc_block_cb() didn't check the value, too.
Assign NULL after free cb_priv in mtk_wed_setup_tc_block() and check NULL
in mtk_wed_setup_tc_block_cb().
----------
Unable to handle kernel paging request at virtual address 0072460bca32b4f5
Call trace:
mtk_wed_setup_tc_block_cb+0x4/0x38
0xffffffc0794084bc
tcf_block_playback_offloads+0x70/0x1e8
tcf_block_unbind+0x6c/0xc8
...
---------
Fixes: 7996844 ("net: ethernet: mtk_wed: introduce wed wo support")
Signed-off-by: Zheng Zhang <everything411@qq.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 32316f6 commit db1b4be
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2666 | 2666 | | |
2667 | 2667 | | |
2668 | 2668 | | |
2669 | | - | |
| 2669 | + | |
2670 | 2670 | | |
2671 | | - | |
| 2671 | + | |
2672 | 2672 | | |
2673 | 2673 | | |
2674 | 2674 | | |
2675 | 2675 | | |
2676 | 2676 | | |
| 2677 | + | |
2677 | 2678 | | |
2678 | 2679 | | |
2679 | 2680 | | |
| |||
2729 | 2730 | | |
2730 | 2731 | | |
2731 | 2732 | | |
| 2733 | + | |
2732 | 2734 | | |
2733 | 2735 | | |
2734 | 2736 | | |
| |||
0 commit comments