Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1728977imm; Sat, 15 Sep 2018 01:52:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdagQ2sdyrU3jKZmbFjHS3gtavgn2drPnucu8ah+ARVunv5D+QKWZXT0Wk5UulEeDVA/Zm7M X-Received: by 2002:a62:6003:: with SMTP id u3-v6mr16516663pfb.114.1537001555546; Sat, 15 Sep 2018 01:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537001555; cv=none; d=google.com; s=arc-20160816; b=sST8DyFtvGZk915lfhq14HTnzeNwgdwtZoDWPL0456jVPn7kJsarL2TKjnV3rHo8QD yfCAdXwddQlusLjYGtxeQE3bVpKGdmaOvxEfQdQt/7LGSHFfdirsKTPBddBoMfn/9DR9 LbMi7rE+QgwGczZxMIIy6s79p8NOb0QV0TdmDNQe/teGhovDttEJpaiP+Y/EzBuf92CP BSNzuVUbh6Oa1QggyDmPqahihvwccdO14IdEgLGWZL23IQjFC9BjC6PvYvg+uIJPMsl2 yxkl1gzb3HESpZyKWrQxr73Hg2YAbCo5I7/h5ZrGjcVvIHzFhvmy1+NrmFEcjmRKPjSa AZlA== 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; bh=QBcWNMZ/g0U+WnI0vV1BLmIFs8dPS5KKo3z3gYe1fcg=; b=qQZgwFb9ckSLTlp+98jwnIgnX+wILYK2U0khDodRf3lVfEebyLpGObqkU0K5T4+uoO aZZ9pj0oOLWF5VldeeVNxDCD94vahKp7m/Cq2rLfD0oaFZt6PEqHdX98cd471dh424Qa 5F+B4kwP4EyDM+m3gx45+T7BrUSamzUVZbhjOIfiwQKXroq9XwowqczsseQLLgdSgOLU U9u1s1mAEfSKYX4pW/7ikMV86+MIlqcrVGTm2r0ZLPhdKJe+ot1AfwAi1aJP1arLGRZw OosyN6/BfgcWPg1Vxo3znrQI3Wt+jXoFWBYS5MmmpED5AdModCfSiR9Su6Q9edl7tStz rWzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=azwHXwmb; 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 n10-v6si9781959pgf.415.2018.09.15.01.52.19; Sat, 15 Sep 2018 01:52:35 -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=azwHXwmb; 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 S1727313AbeIOOIu (ORCPT + 99 others); Sat, 15 Sep 2018 10:08:50 -0400 Received: from mail-pl1-f179.google.com ([209.85.214.179]:44691 "EHLO mail-pl1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726446AbeIOOIt (ORCPT ); Sat, 15 Sep 2018 10:08:49 -0400 Received: by mail-pl1-f179.google.com with SMTP id ba4-v6so5225501plb.11 for ; Sat, 15 Sep 2018 01:50:36 -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=QBcWNMZ/g0U+WnI0vV1BLmIFs8dPS5KKo3z3gYe1fcg=; b=azwHXwmbIdPNLt5GMkMAJwQqFf+NljuXhzs+EyTCxtbiV4W6+l88yLkHZErLcmFLe1 xoyii6TL4d/GCJWSqFh5MkGpSdPCvTEqkuLUvxYOWDND/BoTv28rc4AB2G4cUuOsUVRx 0SM3BK6YhtKZe53K8Ssd/E6u7wDufcKfI4nfkzX1zxbU1SnMzwJEtA91cOJVfnS8V9Rd wl+f/fd2LAuEv/CeIayxoRpKlaDyie9swYao0giA2W2QpIxV9CfRjsCER2xkH5ueyYae s6TofPZnXaJ+oCmMhVYirJCZfeC65zWiLi0f0l/zePGrJBcUK4NryU3RxUGrhGfaatOD TZbQ== 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=QBcWNMZ/g0U+WnI0vV1BLmIFs8dPS5KKo3z3gYe1fcg=; b=ORarOS5Vprim7+wmSLQkHKhFR07anUtlBAgZ0H3leNaG8fd5S9L7PtJ2w5CXqEcHeo T7VmivUcUQRy6xAL861VKjWhAcvUx9lM548E5U7ggK2wXaLw2BUPm/CGtQ4yKjEYJAsk Zlw8ILJoxRDBkpfIsruj31FyNLsoSQDl028kt6nSMUoqGlMaS3SZ5YNxUxyquZ9+LUrb h/l+6uhGmpUUNRN4jFFu1cSOY/K/lEdUzr8KF7zqIGkow2yvQdMxg9Jct69O39Elu+rr 7brgb0w/6ACxPN+D+YrRwUixVuoaB+jxo0M7cYzhiYoe1FI0Sp/76JpO+ZO6RmAZANsd spWA== X-Gm-Message-State: APzg51BqPu3JY3vsoHjVanPy/dJNfEq+diTxbAtNDrUJEdWQ86jXlXUH OnPUuqi46MGzOWDdHUJ6rqeGpqZm X-Received: by 2002:a17:902:b60b:: with SMTP id b11-v6mr15296369pls.301.1537001436627; Sat, 15 Sep 2018 01:50:36 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.71.58? ([2402:f000:1:1501:200:5efe:a66f:473a]) by smtp.gmail.com with ESMTPSA id l3-v6sm11130390pff.8.2018.09.15.01.50.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Sep 2018 01:50:36 -0700 (PDT) To: lee.jones@linaro.org Cc: Linux Kernel Mailing List From: Jia-Ju Bai Subject: [BUG] mfd: ezx-pcap: Possible sleep-in-atomic-context bugs in pcap_adc_irq() Message-ID: Date: Sat, 15 Sep 2018 16:50:31 +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 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. Best wishes, Jia-Ju Bai