Re: [usb gadget]use dev_kfree_skb_irq instead of dev_kfree_skb
From: Greg KH
Date: Fri Dec 22 2017 - 02:50:11 EST
On Fri, Dec 22, 2017 at 03:43:15PM +0800, lpc.li wrote:
> Hi,
> Ethernet Gadget (with CDC Ethernet support) and RNDIS support, device
> is Hisilicon asic and host is PC Windows. Howerver, it has one
> warning. In the rndis_add_header of the file f_rndis.c,
> dev_kfree_skb_irq replaces dev_kfree_skb. And the waning is
> eliminated. I think we can't use dev_kfree_skb in irq disable context,
> because spin_lock_irqsave make sure we are always in irq disable
> context, use dev_kfree_skb_irq instead of dev_kfree_skb is better than
> dev_kfree_skb_any.
Can you make up a patch for this please?
>
> #<--CO------------[ cut here ]------------
> WARNING: CPU: 0 PID: 22 at kernel/softirq.c:146 __local_bh_enable_ip+0x8c/0xb4()
> Modules linked in: g_ether usb_f_ecm usb_f_rndis u_ether libcomposite configfs udc_hisi hi_gpio(O) hifb(O) hi3559_tde(PO) hi3559_sys(PO) hi3559_base(PO) hi_osal(O) hi_ipcm(O)
> CPU: 0 PID: 22 Comm: kworker/0:1 Tainted: P O 3.18.20 #1
Note, 3.18 is _VERY_ old, are you sure this isn't resolved in a modern
and secure kernel release? :)
thanks,
greg k-h