Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752588AbdLMJ0p (ORCPT ); Wed, 13 Dec 2017 04:26:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:60172 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbdLMJ0E (ORCPT ); Wed, 13 Dec 2017 04:26:04 -0500 Message-ID: <1513156889.26281.4.camel@suse.com> Subject: Re: [BUG] kaweth: a possible sleep-in-atomic bug in kaweth_start_xmit From: Oliver Neukum To: Jia-Ju Bai , David Miller , tklauser@distanz.ch, arvind.yadav.cs@gmail.com, edumazet@google.com, johannes.berg@intel.com Cc: Linux Kernel Mailing List , linux-usb@vger.kernel.org, netdev@vger.kernel.org Date: Wed, 13 Dec 2017 10:21:29 +0100 In-Reply-To: <384f1b94-1fd1-cd38-f8ab-fcba872c77e9@gmail.com> References: <384f1b94-1fd1-cd38-f8ab-fcba872c77e9@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 797 Lines: 26 Am Mittwoch, den 13.12.2017, 16:57 +0800 schrieb Jia-Ju Bai: > According to drivers/net/usb/kaweth.c, the driver may sleep under a > spinlock. > The function call path is: > kaweth_start_xmit (acquire the spinlock) > kaweth_async_set_rx_mode > kaweth_control > kaweth_internal_control_msg > usb_start_wait_urb > wait_event_timeout --> may sleep > usb_kill_urb --> may sleep > > I do not find a good way to fix it, so I only report. > This possible bug is found by my static analysis tool (DSAC) and checked > by my code review. > Hi, thanks for reporting. I need to get out my old test device. It will take a few days. The obvious fix would be to set this filter only on initialization. Unfortunately this needs to be tested. Regards Oliver