mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 15:01:13 +07:00
Revert "qlcnic: Avoid potential NULL pointer dereference"
commit b95b57dfe7a142bf2446548eb7f49340fd73e78b upstream. This reverts commit5bf7295fe3
. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. This commit does not properly detect if an error happens because the logic after this loop will not detect that there was a failed allocation. Cc: Aditya Pakki <pakki001@umn.edu> Cc: David S. Miller <davem@davemloft.net> Fixes:5bf7295fe3
("qlcnic: Avoid potential NULL pointer dereference") Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210503115736.2104747-25-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5e4fd74089
commit
c794f7851c
@ -1047,8 +1047,6 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
|
||||
|
||||
for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) {
|
||||
skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE);
|
||||
if (!skb)
|
||||
break;
|
||||
qlcnic_create_loopback_buff(skb->data, adapter->mac_addr);
|
||||
skb_put(skb, QLCNIC_ILB_PKT_SIZE);
|
||||
adapter->ahw->diag_cnt = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user