Received: by 10.223.176.5 with SMTP id f5csp7069wra; Mon, 5 Feb 2018 15:26:28 -0800 (PST) X-Google-Smtp-Source: AH8x2260CyEUJlH7qHgMqIYwJzMmTHPxYi5SYQi4TiVnipkUoXFO6QKFyFSZ04K/BJJndgARn3VQ X-Received: by 10.99.167.75 with SMTP id w11mr361617pgo.246.1517873188795; Mon, 05 Feb 2018 15:26:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517873188; cv=none; d=google.com; s=arc-20160816; b=XMm/KRqGFqJth55Tf6gnXqTOEQosvUaeyqojbTwKF2vFpMiNPmPec0Iq7Wc9EEN40L A/g0o3EyY36gqGqwn5kMPuslQxKAV4ZMLJp1k/9vunqhMEM2qG+HJgbaUbmgNwoicQgy hyZmqNWF6o4S35/g9Yszem8DHK77sFU5Y4cKs4lHCP9i6tRIVN2DSXBAxJ5ABD7LRpTP QXvcfkK5k5lDWKm4zBAjQbGvG/hBu4jfoaxZKxVPimCaTFHtaWzft2aepzHuD5BGQ+0o N/Re/iS6jqCPmyd8UtZuoIW29DjfKMnfAEgcnCyJK2r0MGDKqUuVckjJyijvC1O9e6fY jX0Q== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=bUsacQXx+EmzVScmgKQ0H3QMMjlacKAYqdSekKe9W/Y=; b=vI+dR9s72j5fr6uDELPTGgT+4vZ/8rs9lxlw9RiNxkAdpSeu3l0PTT9iwY/nnJvOw7 Wa3f6Y3CD96jDKcH8xd7B4d0oX+xHPTkvH9cZZM5UhvKoe80mry6CS732p1UnSzegfA2 LEDI3dbZ/bNdEgLt8uOBpkMRCJFF5Ev0MvQ4CDWFPyTxjFxdZ3wRIjiyk6F2yRsc/2yM 1m1gs8KvyaVwTMhXUzBY4hg5X+fRGIj5iVYDyzjTe0FF5HAefLj/RkVTA8dXj1udz150 JCzTisLNhEQXiS/OT6NQrF90MOLrWfxJ1hk10jyb1PHq4RKERBwYjKov36LoUZPYmq5j Ymkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cAA+HANI; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t138si3544925pgb.548.2018.02.05.15.26.14; Mon, 05 Feb 2018 15:26:28 -0800 (PST) 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=cAA+HANI; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751792AbeBEXZ0 (ORCPT + 99 others); Mon, 5 Feb 2018 18:25:26 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:46287 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbeBEXZR (ORCPT ); Mon, 5 Feb 2018 18:25:17 -0500 Received: by mail-pg0-f66.google.com with SMTP id s9so33605pgq.13; Mon, 05 Feb 2018 15:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bUsacQXx+EmzVScmgKQ0H3QMMjlacKAYqdSekKe9W/Y=; b=cAA+HANIzgKRxH7pAdYs/fOcsDcSsogHqxyTFXUFU6DTX62jQ/bC7J179AM4OTmpNT W9zjsbHkSWCHCPMge7BLizNvt7zfTs8hAyzXDKVHck8azTFQkUqdf0fj2l3edc1TENhZ 5WLhcBnhMW8Le1Y7KwZdT2g5f2BsNI7MDv+OJh8IBHCoeWZnCwe6dXuT5hIosZWkqz+L 2Da8edNZBVxBVx9Ej5Ay+ypSpT7NLyfDpFrp+x4bn99eZyUXT4PWMHt8xLzIR2k+6XD0 IefPsjt+dO+FnTlFn7YvM+WU2qdloTIDH88iFRLK3dLuEil1WMxPBI0pHzwRI93NiZxC fFig== 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:in-reply-to:user-agent; bh=bUsacQXx+EmzVScmgKQ0H3QMMjlacKAYqdSekKe9W/Y=; b=kWmUjkO8Ix29AELFLzsG4P+Toip/wmTjAtTiLgufnadPjuYB4oH0sa4cBsatuOUWPd 4nuuNUNZ2T057aKyi7ex/1336UEmMiaDGMrrEr7W4bc+YAMc7u1gF00cjTHA9Vxweb/1 El+cXdQH62+G8dkGn9mrOVKSyRdGgk4VwiPx4iogZoXjULDU59JJ8420G82UpFUmyJkX cusC92KrB7CGVqgFDV6cZhUNqIOaNeU14oMfo8v6p9YcdRiXSKpRWOHXGHvLjnkaILdE EW31c6i26Xd7AymrO+vK6rzHdDP3dnxySlzt8Yx0iJrLyZgXQLA6/fJcjNKp5VwqdrmL z0Vw== X-Gm-Message-State: APf1xPDjGQPiQCFRhBWl1gcgiX6FaOU8Ut+wSrQzvepEVWLa2p1b5Hsb prgjYC4DfJuJGMpUbZG2Vl0= X-Received: by 10.98.174.26 with SMTP id q26mr440649pff.92.1517873116699; Mon, 05 Feb 2018 15:25:16 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1611:da80:8749:c06f:9515]) by smtp.gmail.com with ESMTPSA id p20sm17180450pfh.100.2018.02.05.15.25.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Feb 2018 15:25:16 -0800 (PST) Date: Mon, 5 Feb 2018 15:25:14 -0800 From: Dmitry Torokhov To: Jia-Ju Bai , Daniel Ribeiro Cc: ilya.muromec@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [BUG] drivers/input/misc/pcap: a possible sleep-in-atomic bug in pcap_keys_handler Message-ID: <20180205232514.GE46524@dtor-ws> References: <9af81fe8-e07c-9161-2d85-3eb23a198ec9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9af81fe8-e07c-9161-2d85-3eb23a198ec9@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 12, 2017 at 04:32:01PM +0800, Jia-Ju Bai wrote: > According to drivers/input/misc/pcap_keys.c, the kernel module may sleep in > the interrupt handler. > The function call path is: > pcap_keys_handler (interrupt handler) > ezx_pcap_read > mutex_lock --> 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. Let's see if Daniel's email still work. I am not sure how it worked to begin with, given that we've been taking that mutex since very beginning, and pcap_isr_work() disables local interrupts... Thanks. -- Dmitry