From: Yang Yingliang <yangyingliang@huawei.com>
To: <netdev@vger.kernel.org>
Cc: <isdn@linux-pingi.de>, <davem@davemloft.net>
Subject: [PATCH net 1/3] mISDN: hfcsusb: don't call dev_kfree_skb() under spin_lock_irqsave()
Date: Wed, 7 Dec 2022 17:32:37 +0800 [thread overview]
Message-ID: <20221207093239.3775457-2-yangyingliang@huawei.com> (raw)
In-Reply-To: <20221207093239.3775457-1-yangyingliang@huawei.com>
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: 69f52adb2d53 ("mISDN: Add HFC USB driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/isdn/hardware/mISDN/hfcsusb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
index 651f2f8f685b..9659ebeb99f0 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.c
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
@@ -330,12 +330,12 @@ hfcusb_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
spin_lock_irqsave(&hw->lock, flags);
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);
@@ -1330,7 +1330,7 @@ tx_iso_complete(struct urb *urb)
printk("\n");
}
- dev_kfree_skb(tx_skb);
+ dev_consume_skb_irq(tx_skb);
tx_skb = NULL;
if (fifo->dch && get_next_dframe(fifo->dch))
tx_skb = fifo->dch->tx_skb;
--
2.25.1
next prev parent reply other threads:[~2022-12-07 9:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 9:32 [PATCH net 0/3] mISDN: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-07 9:32 ` Yang Yingliang [this message]
2022-12-07 14:54 ` [PATCH net 1/3] mISDN: hfcsusb: " Jiri Pirko
2022-12-09 23:57 ` Jakub Kicinski
2022-12-12 1:58 ` Yang Yingliang
2022-12-07 9:32 ` [PATCH net 2/3] mISDN: hfcpci: " Yang Yingliang
2022-12-07 14:58 ` Jiri Pirko
2022-12-07 9:32 ` [PATCH net 3/3] mISDN: hfcmulti: " Yang Yingliang
2022-12-07 14:59 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221207093239.3775457-2-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=davem@davemloft.net \
--cc=isdn@linux-pingi.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox