Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp270496imm; Sat, 1 Sep 2018 02:11:26 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda1B1SbkcBSOzCwV3+InRePxUrMoxOrDhhzHImCL4rNiJ93dB6uTr8SyOe/N0mDLhPWWfzq X-Received: by 2002:a63:ee56:: with SMTP id n22-v6mr18019153pgk.402.1535793086878; Sat, 01 Sep 2018 02:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535793086; cv=none; d=google.com; s=arc-20160816; b=eBSKw4RptZYb12R2veirAY/vPmDGR+MFGNxlLKS6Dal1uAbmJXL7IcT/8zN/+ig/YR B4TE7qyKjxGvE8KtfgczGTpyXEOMwNQV64Smn4zk37BFdhXFnsUHeMASRJ+Y4QC8HFvi Cvp/o+/v09V8tt3rsb58M6HVfUY9EBknMqHhB0fjBDRBrq4mvyEKmZOsJXUBsNF+OzK7 N2CNd8nUSHcSqQPHDOMieNakDWMs3FfV6PXA7vtInCW45GrEznLcsWuU8kNm9PVG2UA9 H4rqp5P37YLL/rUs12Dcj6LvrGzo08VFPBf706z08Q7k7ZGG2RbC7z8CRrdQugaj1zAi tDaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:user-agent:date:message-id :subject:from:cc:to:dkim-signature:arc-authentication-results; bh=lN4XCwO975RIo5FOR8E6anZeXFMQCOCSh3afMOb9Mjw=; b=c5wjMWv4br2LHO7c7L6i9fQGaxyoMfPwY18mhGzcw9O9dvRPq529+iz470wo9o1bcK IufRS5PDJJwb0cauPAk/Xfp2CSw0Ket3Yjja5XcONU7LvphzuVWWGtf4ssN17x7e6kj9 AOfoJ1i9yxR7ep5jBVq1HIwObEIRLMCFAAg5ogBBZTf9xL6/6BaMguTsXjcamRxbvrHz 2k/Z1T9SOgtmoDnJtf3LaHvXTcUy+1S/qE/A5vPBefRQ+aO0IwRvFgT1JqzPpYgQBiRM pTibTMvhBL+YhUuKlzHHqxr8O48SggLn3oJRcGLWDdcbkQrQHhcblRI82Kg5p9jqCw8j AJLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AX1Osqn1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14-v6si12235889pgg.216.2018.09.01.02.10.59; Sat, 01 Sep 2018 02:11:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AX1Osqn1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727360AbeIANU0 (ORCPT + 99 others); Sat, 1 Sep 2018 09:20:26 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41893 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726648AbeIANUZ (ORCPT ); Sat, 1 Sep 2018 09:20:25 -0400 Received: by mail-pg1-f193.google.com with SMTP id s15-v6so6482525pgv.8; Sat, 01 Sep 2018 02:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=lN4XCwO975RIo5FOR8E6anZeXFMQCOCSh3afMOb9Mjw=; b=AX1Osqn1QZfzOceVPQK3YBAb37gjgix3eKqCmmtI71d+xzGtZihN0sFcxNwVCTiYw8 T2sdF7ML0CeRB0OkkjCfNKR9K0cRWVrB3lIZduQM0Fwt9GWMYpEEKJttWpZrulkbgB13 GJheAznj3pCt/ZLDxtt1wt63jAtKupOYZkrB0B6sDbxAG1ETc3V71E5/SqiIH2+rrZ/G zgwwxY0UoJa6hIhfis+VeIR2Y1n5yBoLOMrs5VsXrNB08MkjqTIWNahhXUKWJo3N44Ks Bd3jkshJdeNwG78YMe1RRLvmDhjW6vKNqdi3Qzmxfww+rboLgWrFXuVJIYLWAfuwtSAl N5pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=lN4XCwO975RIo5FOR8E6anZeXFMQCOCSh3afMOb9Mjw=; b=lSujKczY8Y/glNllOqgeHUdM29cqwxc8Ye6ZWkQ+U0yHUSPD2BsrDV6JWOYp88Zx+i ifpvofDxE5T914Tuxrm6e2nfOgmdhJW+OsORREQXQTXhc/dYjFvxGIOxxF+zrp0Sa276 BVcAp5MJl7r+9vvqhAs+6WzdNflUW3FVve4hBLxNl2imc8+GfAjHENz+D/jaI1q1kVR6 qznNTBlomNG4zaUvPneD1ZAsGJP0nJJKvk6O8HKwR3TRbPX82/qSFj3LoC+sq/8YF+6d 9HJssywDuT8MkTEYGRTNoV0TyYaqlUr7qGAG0e61EbhK5loKu7qT8JnyJY1aq8m7Mbmq uXEw== X-Gm-Message-State: APzg51BdL+jPH3SdkXXHEjx0V2CtTNTornDeAIRVcY+ENZ0907I0b3b7 bCNXkw38grkIMLK01i8RaLzDCAXx X-Received: by 2002:a63:7b4b:: with SMTP id k11-v6mr18418577pgn.64.1535792946607; Sat, 01 Sep 2018 02:09:06 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.71.15? ([2402:f000:1:1501:200:5efe:a66f:470f]) by smtp.gmail.com with ESMTPSA id w72-v6sm39111011pfa.26.2018.09.01.02.09.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Sep 2018 02:09:06 -0700 (PDT) To: amitkarwar@gmail.com, nishants@marvell.com, gbhat@marvell.com, huxinming820@gmail.com, kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Linux Kernel Mailing List From: Jia-Ju Bai Subject: [BUG] net: wireless: mwifiex: A possible sleep-in-atomic-context bug in mwifiex_wait_queue_complete() Message-ID: <35980039-f268-2db3-5c7d-19ab0c917d44@gmail.com> Date: Sat, 1 Sep 2018 17:08:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mwifiex_usb_tx_complete() is a completion handler function for the USB driver. So it should not sleep, but it is can sleep according to the function call paths (from bottom to top) in Linux-4.16: [FUNC] schedule_timeout drivers/net/wireless/marvell/mwifiex/sta_ioctl.c, 63: schedule_timeout in mwifiex_wait_queue_complete drivers/net/wireless/marvell/mwifiex/cmdevt.c, 673: mwifiex_wait_queue_complete in mwifiex_send_cmd drivers/net/wireless/marvell/mwifiex/main.c, 1046: mwifiex_send_cmd in mwifiex_multi_chan_resync drivers/net/wireless/marvell/mwifiex/usb.c, 288: mwifiex_multi_chan_resync in mwifiex_usb_tx_complete I do not find a good way to fix this bug, so I only report it. This bug is found by my static analysis tool DSAC. Best wishes, Jia-Ju Bai