Skip to content

Commit

Permalink
net: xilinx: axiethernet: Correct skb free function
Browse files Browse the repository at this point in the history
Changed dev_kfree_skb to dev_kfree_skb_any inside axienet_start_xmit(),
as its inside the irq context. Fixed the below warning and crash dump.
	1. WARNING: CPU: 0 PID: 0 at /kernel-source//net/core/dev.c:4088
		net_tx_action+
	2. Unable to handle kernel NULL pointer dereference at virtual
		address 00000158

Signed-off-by: Priyadarshini Babu <priyadarshini.babu@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
  • Loading branch information
Priyadarshini Babu authored and Michal Simek committed Aug 3, 2018
1 parent 3e1c99a commit 8e2082e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/xilinx/xilinx_axienet_main.c
Expand Up @@ -1456,7 +1456,7 @@ static int axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
*/
if (skb->sk)
skb_set_owner_w(new_skb, skb->sk);
dev_kfree_skb(skb);
dev_kfree_skb_any(skb);
skb = new_skb;
}

Expand Down

0 comments on commit 8e2082e

Please sign in to comment.