Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp579770imm; Wed, 10 Oct 2018 00:33:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV61XTrR2Uu8v303+XmQdu0iSQ601teiMqcKSnQCB1FBgxdzbGuC5T2FxQRejbK4SyhGGqxjM X-Received: by 2002:a62:11cb:: with SMTP id 72-v6mr33248942pfr.120.1539156783041; Wed, 10 Oct 2018 00:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539156783; cv=none; d=google.com; s=arc-20160816; b=xNMQFw/DHUXVwYg2DZSc6DhqOsa/mG6PpMFOi4xqj5QJjvHSg9SIhR3CI5V4S9BP+q kp4PZT/w7ZtZpUiN18O8GAOMbL9SuqpaJVRjl6sVx01hH1PIsXT4BLKPng+BRnCUlGdM O855DGTRl3g57jer3OTaFQRAx5Tka201sGxaW4jZ4H4bs/xSLxSllk2qHZsc7pvarvXH 8KdPUWHg72zphx9EXkaI69adgHRUpgKY3zE7i/MSF8ixN4hF9DuSPFsakEDt12ZiZRdv Ja4nCkL5M9OGRd9yyuT8f+XmF2CKXRJ5SAoxcNM5PPumNyNZIT1QDl8InVylIzD3dlnO bH2Q== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=44drmNbumbsdrvHTV4k5yE8FsN7iErm2hROHs2b+84Q=; b=xZOlRn/hh0tp8ZslKI6umrNeday9PnhrwOMPUviSeBPlGK3HHNCrupx0C7J4IL7EIr 0dx9FkcqcQZyq5jaxJbzslcouRztsmghd7J8NPHbjTf+Vr2sd55UArpOaaDXBLVO5UyY lYbPHnxYZEqSp5roWmCy5aZ5tIvMRgEqJtEjU/Nd+8OX4ziMcHnlcowI8MyTdau+ucEE 6Ikr8g6Uxji7R5zpJ3iEJmbhBZFQ4rMPE7SJGe9E2jwEXnO0ibDYqgNz8aBolWhCIZtf 5yVqaoEPoLaBb1ij5pCGG02FfGcsSts5Kg4t3m9y1uGdkrtJ/e3YuYeeJ7v2WTrCQr/7 k0Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fO8arnAv; 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 n15-v6si23656402pgi.537.2018.10.10.00.32.48; Wed, 10 Oct 2018 00:33:03 -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=fO8arnAv; 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 S1726770AbeJJOwr (ORCPT + 99 others); Wed, 10 Oct 2018 10:52:47 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:32991 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbeJJOwr (ORCPT ); Wed, 10 Oct 2018 10:52:47 -0400 Received: by mail-pf1-f196.google.com with SMTP id d4-v6so2194890pfn.0 for ; Wed, 10 Oct 2018 00:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=44drmNbumbsdrvHTV4k5yE8FsN7iErm2hROHs2b+84Q=; b=fO8arnAv4lPQEw8ax3qT2PhlqA+WIeZWcCVMGpFjFqE5N8n55O3XfxP3xvaweHeDpC lExmV35BVcRejDKz3K/ZUOhXgUk7SChOt5xrpqEF1+D4R87oooYAjHNgxzbjJWm+lKKE eywmChi5et5hY6mMA9MVhwJq7nLjck0Zm7Xl8I0BqU5vDsLNnDv9ftavOZn0wdkGPRq6 nLTLQOKtFtZPisE4zsFFcI+37eCNK3AAwLLHcQqo3lCpi7r52W+MeCds2LAohnkgdqi7 eSxj8pJe6GAzUt7E9zF7LHQNpn0Atjdz6xMTS0eIYc5QoVOBWEwqD4UgRdgmvoBv16LW FGEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=44drmNbumbsdrvHTV4k5yE8FsN7iErm2hROHs2b+84Q=; b=LoZyjTd7nfKnNIRoPh48BomNMAkQqA9Nv7ujzizorjr8Bfs5Yv1fJY2tAoEY/dYDQe ssYmXRceV2XpRlLzmWYohbVnzknV+nCQ7FBh/jNYPRgbH29P6iTkBzzEqUYozXi7i0NQ QnLIh8QzTDjEwua0H5ZwRQn7HC50tV+atIVMF+XXMk7awoNjmyqgskQxKH1Ea/vVYj0p /bnwARSZAxxccUefXOPfU/zxMyNUiUy0yO53f+AO/oVSPAhad5EnrWrEjMVCPaNUEAGV g45lUuU1zNka/4fJL2+5v/c/ORbR3Hu+oVqw+UDzCY1wlMFMOHzDRT7WkSt7oGS9BnFu PwnA== X-Gm-Message-State: ABuFfog1Qrhu+2ReaTi3fDun5p7D2idiFFoPoU1BfGdaQs8pV7pzg/Pw rrxBY5YKA94fiXrukkhhjda80cYW X-Received: by 2002:a65:4385:: with SMTP id m5-v6mr27261104pgp.219.1539156714597; Wed, 10 Oct 2018 00:31:54 -0700 (PDT) Received: from ?IPv6:2402:f000:1:4414:a441:1820:9cbd:367b? ([2402:f000:1:4414:a441:1820:9cbd:367b]) by smtp.gmail.com with ESMTPSA id o24-v6sm36365574pfa.90.2018.10.10.00.31.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 00:31:53 -0700 (PDT) Subject: Re: [BUG] mfd: ezx-pcap: Possible sleep-in-atomic-context bugs in pcap_adc_irq() To: Lee Jones Cc: Linux Kernel Mailing List References: <20180917010340.GA3900@dell> <20181009090715.GE4939@dell> From: Jia-Ju Bai Message-ID: <8579fb94-aef5-7782-b062-0dc9bea29e4b@gmail.com> Date: Wed, 10 Oct 2018 15:31:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20181009090715.GE4939@dell> 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 On 2018/10/9 17:07, Lee Jones wrote: > On Mon, 17 Sep 2018, Jia-Ju Bai wrote: > >> >> On 2018/9/17 9:03, Lee Jones wrote: >>> On Sat, 15 Sep 2018, Jia-Ju Bai wrote: >>> >>>> The driver may sleep in an interrupt handler. >>>> The function call paths (from bottom to top) in Linux-4.17 are: >>>> >>>> [FUNC] mutex_lock_nested >>>> drivers/mfd/ezx-pcap.c, 272: >>>> mutex_lock_nested in pcap_adc_irq (interrupt handler) >>>> >>>> [FUNC] mutex_lock_nested >>>> drivers/mfd/ezx-pcap.c, 100: >>>> mutex_lock_nested in ezx_pcap_read >>>> drivers/mfd/ezx-pcap.c, 281: >>>> ezx_pcap_read in pcap_adc_irq (interrupt handler) >>>> >>>> [FUNC] mutex_lock_nested >>>> drivers/mfd/ezx-pcap.c, 85: >>>> mutex_lock_nested in ezx_pcap_write >>>> drivers/mfd/ezx-pcap.c, 285: >>>> ezx_pcap_write in pcap_adc_irq (interrupt handler) >>>> >>>> [FUNC] mutex_lock_nested >>>> drivers/mfd/ezx-pcap.c, 244: >>>> mutex_lock_nested in pcap_adc_trigger >>>> drivers/mfd/ezx-pcap.c, 299: >>>> pcap_adc_trigger in pcap_adc_irq (interrupt handler) >>>> >>>> These bugs are found by my static analysis tool DSAC. >>> Not sure what you want me to do with this. >>> >>> Do you have something in mind? >>> >> I find some possible bugs in this driver, but I do not know how to correctly >> fix them... >> Could you find a good solution? > If you have found bugs and do not intend on fixing them, please report > them via the 'File a Bug' option here: > > https://bugzilla.kernel.org/ > Okay, thanks. Best wishes, Jia-Ju Bai