Message ID | 20221207093239.3775457-4-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mISDN: don't call dev_kfree_skb() under spin_lock_irqsave() | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net |
netdev/fixes_present | success | Fixes tag present in non-next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 9 this patch: 9 |
netdev/cc_maintainers | success | CCed 3 of 3 maintainers |
netdev/build_clang | success | Errors and warnings before: 2 this patch: 2 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | Fixes tag looks correct |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 9 this patch: 9 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 28 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
Wed, Dec 07, 2022 at 10:32:39AM CET, yangyingliang@huawei.com wrote: >It is not allowed to call consume_skb() from hardware interrupt context >or with interrupts being disabled. So replace dev_kfree_skb() with >dev_consume_skb_irq() under spin_lock_irqsave(). > >Fixes: af69fb3a8ffa ("Add mISDN HFC multiport driver") >Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 4f7eaa17fb27..9f932cbb2a20 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -3266,12 +3266,12 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd) } skb_queue_purge(&dch->squeue); if (dch->tx_skb) { - dev_kfree_skb(dch->tx_skb); + dev_consume_skb_irq(dch->tx_skb); dch->tx_skb = NULL; } dch->tx_idx = 0; if (dch->rx_skb) { - dev_kfree_skb(dch->rx_skb); + dev_consume_skb_irq(dch->rx_skb); dch->rx_skb = NULL; } test_and_clear_bit(FLG_TX_BUSY, &dch->Flags); @@ -3407,12 +3407,12 @@ handle_dmsg(struct mISDNchannel *ch, struct sk_buff *skb) } skb_queue_purge(&dch->squeue); if (dch->tx_skb) { - dev_kfree_skb(dch->tx_skb); + dev_consume_skb_irq(dch->tx_skb); dch->tx_skb = NULL; } dch->tx_idx = 0; if (dch->rx_skb) { - dev_kfree_skb(dch->rx_skb); + dev_consume_skb_irq(dch->rx_skb); dch->rx_skb = NULL; } test_and_clear_bit(FLG_TX_BUSY, &dch->Flags);
It is not allowed to call consume_skb() from hardware interrupt context or with interrupts being disabled. So replace dev_kfree_skb() with dev_consume_skb_irq() under spin_lock_irqsave(). Fixes: af69fb3a8ffa ("Add mISDN HFC multiport driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/isdn/hardware/mISDN/hfcmulti.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)