Skip to content

Commit

Permalink
net: arcnet: Do not call kfree_skb() under local_irq_disable()
Browse files Browse the repository at this point in the history
It is not allowed to call kfree_skb() from hardware interrupt
context or with hardware interrupts being disabled.
So replace kfree_skb() with dev_kfree_skb_irq() under
local_irq_disable(). Compile tested only.

Fixes: 05fcd31 ("arcnet: add err_skb package for package status feedback")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jinjie Ruan authored and davem330 committed Aug 25, 2023
1 parent 49fa4b0 commit 786c96e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/arcnet/arcnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static void arcnet_reply_tasklet(struct tasklet_struct *t)

ret = sock_queue_err_skb(sk, ackskb);
if (ret)
kfree_skb(ackskb);
dev_kfree_skb_irq(ackskb);

local_irq_enable();
};
Expand Down

0 comments on commit 786c96e

Please sign in to comment.