qcacmn: Avoid invalid invalid_peer_head_msdu list
Add a check to validate invalid_peer_head_msdu before accessing to avoid NULL dereference. Change-Id: I9218bdd1100b48a32240546f380b1437ae72c406 CRs-Fixed: 2585651
此提交包含在:

提交者
nshrivas

父節點
ef9d824e14
當前提交
09d116aee9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -891,13 +891,6 @@ out:
|
||||
if (soc->cdp_soc.ol_ops->rx_invalid_peer)
|
||||
soc->cdp_soc.ol_ops->rx_invalid_peer(vdev->vdev_id, wh);
|
||||
free:
|
||||
/* reset the head and tail pointers */
|
||||
pdev = dp_get_pdev_for_mac_id(soc, mac_id);
|
||||
if (pdev) {
|
||||
pdev->invalid_peer_head_msdu = NULL;
|
||||
pdev->invalid_peer_tail_msdu = NULL;
|
||||
}
|
||||
|
||||
/* Drop and free packet */
|
||||
curr_nbuf = mpdu;
|
||||
while (curr_nbuf) {
|
||||
@@ -906,6 +899,13 @@ free:
|
||||
curr_nbuf = next_nbuf;
|
||||
}
|
||||
|
||||
/* Reset the head and tail pointers */
|
||||
pdev = dp_get_pdev_for_mac_id(soc, mac_id);
|
||||
if (pdev) {
|
||||
pdev->invalid_peer_head_msdu = NULL;
|
||||
pdev->invalid_peer_tail_msdu = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
新增問題並參考
封鎖使用者