Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3415001imm; Sun, 16 Sep 2018 18:04:14 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb5d2VyzRYva+hybAMDDbqeur8gUhKyvqSmHLtPkvlAAZ16inuL1zyO67kQtQ8Vq9g5BijH X-Received: by 2002:a63:9e41:: with SMTP id r1-v6mr21007522pgo.362.1537146254268; Sun, 16 Sep 2018 18:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537146254; cv=none; d=google.com; s=arc-20160816; b=CMnIrqWneqiORMYanlm9c76tKFgNVGJ5OHu2L/k56bQ/4tscqI3XugwVoYQl0qEmIA aXF9to7GYnrKmly73ShQ3YPqAW6e3b2aYAUj7jE/Fn+hIU4N6bLLnzxT9GL+j/lxtEaZ 49RuKtLxAD84OgrqnYsYzCedNAUz6zWEOhqO/Q2ROQ3FosXyR7eI0rblCnezd26NlLLq ib8x8HPryLARkMdK0qGutuJFTYtLUbmqhuXleQ4LUSi3ngLHgHIWBYoQ69yofgvEOTfq +jK8uGtS9LNuaUWD9WeYEp3ain1lGBT6k+C00vzSZGHNSq/9V4B5Orxe5ttoyrVCs02y yFrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hiV+ijeh4HnsxpYfb8kP050hNtXZFsLt0pk7mL5EDws=; b=EedlsM+u81Scwvhe1C50hz2/e+gG3xem5xeMBYYV2pxk8sTLluQ1yhD7VLUfTaOD7S hXHW0fgIaMp39AHR3zd+fatT1t7RlqMZQk3W9HNOoTHvxUCKp5Y3h8wWa14gjMlKNt+r WbaMs5iaDpdT391Zqir1vP0k6gS01HqFpdvJg4GccYz+KeM6gzsBOfIglezlAsHomBtu j4HeJ4Mg9Hs5v+1XtSO76K7JfomFirAu5xYKAXYJ8wP2H3YGf0PDKPmJxd5AVvtBEYaH eR3XCX3nySnPjFKZd0kaEcIJYu3LrAO/LcqN5F0eGHUBVxFni7lGxsfNKwvrHfz4kllM OaXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xn6cRDwS; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14-v6si14328953pgk.169.2018.09.16.18.03.58; Sun, 16 Sep 2018 18:04:14 -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=@linaro.org header.s=google header.b=Xn6cRDwS; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbeIQG2q (ORCPT + 99 others); Mon, 17 Sep 2018 02:28:46 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53043 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbeIQG2q (ORCPT ); Mon, 17 Sep 2018 02:28:46 -0400 Received: by mail-wm1-f66.google.com with SMTP id y139-v6so7536227wmc.2 for ; Sun, 16 Sep 2018 18:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=hiV+ijeh4HnsxpYfb8kP050hNtXZFsLt0pk7mL5EDws=; b=Xn6cRDwShA8SNRk6cSyJc7BVWCNALBt6u11eWPXQhx7vJO2A1LF7+dzOyR+mNJiFeG O1nBO8NCThJXE4FbpMdRWD/EoRtMjdeh3rWTeJggNoB4LnHV9PuiouSYKLuflvKj6Ijz LTNHizX8IDAC4kElD7zOPCZkRa6Q1IYjyZc3E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=hiV+ijeh4HnsxpYfb8kP050hNtXZFsLt0pk7mL5EDws=; b=Dno6Zc4YCumcH2PFZXlbBGln/LP5gmiKwb5PKtN5LQiGsuLJf6b0VoHfvDRWm8IAhT H/sG8sXmNVFOKqLQm9zvXFKMijsHQB5wFj+eAeWEhFaJhoXeK0bOzzxs0WuUUJ2u+yHh 6g3m/KqBh0Al9UyhFruseZsLTRrhNgxlQEY8rof9zRQxypoNV/fJlXRKSPjdmALkM1WQ l20YForvmK04l3GUMh8vfAKJU2nXblhesTQADmI+ePd9B6gBvfsLqRFzqqBL6Yqc2WUg DmJtTyTJe5Cw0bJyhppYOzzAcusKdSHIk2v+D9+evm1aINC87l6rhDL8nzThomj4CUVY WwVQ== X-Gm-Message-State: APzg51BiOAaGTFXA+Hw93qFIHUdNdVTTSQMk656GSar90a5uDStAlptr yk/NWr5IbxKBJ/qDKHd83buiiw== X-Received: by 2002:a1c:e289:: with SMTP id z131-v6mr9504453wmg.32.1537146230612; Sun, 16 Sep 2018 18:03:50 -0700 (PDT) Received: from dell ([2.27.167.7]) by smtp.gmail.com with ESMTPSA id n5-v6sm4513630wmh.1.2018.09.16.18.03.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Sep 2018 18:03:49 -0700 (PDT) Date: Mon, 17 Sep 2018 02:03:40 +0100 From: Lee Jones To: Jia-Ju Bai Cc: Linux Kernel Mailing List Subject: Re: [BUG] mfd: ezx-pcap: Possible sleep-in-atomic-context bugs in pcap_adc_irq() Message-ID: <20180917010340.GA3900@dell> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog