Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754234AbdLVHuI (ORCPT ); Fri, 22 Dec 2017 02:50:08 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51330 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbdLVHuD (ORCPT ); Fri, 22 Dec 2017 02:50:03 -0500 Date: Fri, 22 Dec 2017 08:50:05 +0100 From: Greg KH To: "lpc.li" Cc: balbi@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [usb gadget]use dev_kfree_skb_irq instead of dev_kfree_skb Message-ID: <20171222075005.GA18229@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1084 Lines: 25 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