Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2646256imm; Sun, 12 Aug 2018 20:12:10 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzbdHoqVDBMKviXTYkoxGTm9/bGmedpxl9/L3FBvNmD4fM92tNqcdoE2H7Etj+UPygV4HaV X-Received: by 2002:a63:175b:: with SMTP id 27-v6mr15182017pgx.31.1534129930671; Sun, 12 Aug 2018 20:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534129930; cv=none; d=google.com; s=arc-20160816; b=I+tQeQ6LQ2yE9FC1C6iWIkrhFdvMe/BeTJ3pcH5Ypg4n4q9ASoGr4gOQUh2WEgFyY3 FXezwLEViWObEvMjL/iV6l8lFZ5+tcj/Jf4DY2GB212i/6fidrOjSbPc2lhD6ADrMsa+ hOzeSmraMjznHX8oHSAjt0TveuP8ufWKzqpR+qrsILxikcMBDNVuJYqlzuI25O1EvaZv jgXseCp7rFBfIezb2fY1DyJ2MoBMbLTh8xnUb/tv67c98qzzcJOpww4O05SG+ke1Pc5t UaLH2kUHrhvFgADDNW9SzxjAkc+zn9hbcTUXqDA+w8gHDK8Dib6Oud6litpkFvy/ixC3 WvtQ== 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=GRnuIkCAp9Yad6XxdSbUQ+/GvlApUDzXZbi+ZA+He9g=; b=HT3JPjcXIGGk0OAV+kEjN1vnbckFmr5DWOR1iUTs+KBzAnYeVm+rO0K1CSJaVqM+6+ hG88OhZ+ASao4ksSFwvpE6m1LEM7q9M1CBTD7pWNjTDJJmhdY2iXz4r83lzW+SuJqoEt jqP7DR16NeChF5sF8asjdsNFxrK9oupdV0RjuDt15KB4zWCO/NEu9dgIeYItG85Xc0ED Zsla3cAkgUqd4bjAMSSoj+voq4Jx/3af5riZoQMSNtEsV2t9hUBiyc1h1ewkcUGMZ72b Onmnf+WNtJ7ZhzUgyVTvXbaMF3M6ECon7latkf5Nr0ihTEU1bcec4ORs0/pP43Hw1qhV fwBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="I/+t2aa2"; 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 g26-v6si16232819pgb.349.2018.08.12.20.11.55; Sun, 12 Aug 2018 20:12:10 -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="I/+t2aa2"; 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 S1727300AbeHMFun (ORCPT + 99 others); Mon, 13 Aug 2018 01:50:43 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42341 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbeHMFum (ORCPT ); Mon, 13 Aug 2018 01:50:42 -0400 Received: by mail-pg1-f196.google.com with SMTP id y4-v6so6872377pgp.9; Sun, 12 Aug 2018 20:10:29 -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=GRnuIkCAp9Yad6XxdSbUQ+/GvlApUDzXZbi+ZA+He9g=; b=I/+t2aa2EsCE4/Ah6lvtymYe9fg3K4yWV9ckz9acxKEqH6xW/ehBBKvv1HWlZ1VHnY rCeW1zdJOYDgVz7irh1GPK5h8yt1Gq7iqtkBeqVCvcm2H8cubKeWDDA5kkDNB7oogNbY WCzYYV/97nCORlThA0gFACrJC46o2kvbyUT8uVQ43N6ol+OfEyFhwY+PpUHY9F2f0ll4 gP7rBfP5gtHz70Mvan2EPcYVHjybmjsiZyf0HyHo5ZAnLSyE/tl48o+I18R6gpMSPDtE zZQWijXnl6k+CaroWFL/4Hz5WOmxw612jJQBe4JH8Edue8Ee++x8mxtsIPEjE1WA+HoT zYGA== 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=GRnuIkCAp9Yad6XxdSbUQ+/GvlApUDzXZbi+ZA+He9g=; b=WyPGd6DWXcDBOFdKEXVZiKtv9WhDtgHDGO57/kyWxXsWY12gajVZFioIOQ6k+2pnQJ lP5OK6uIe7jyIW7+4p74L3oO1gENA0LYtqfWgcaCex0nAs64Aq7P0KTkQKDeOSAo66Jb sVevcX4Oe5v39TX1P4Ykxt4k6Zw7igSTLs1TXGcwF25lrnSPIB8MfkQkycZ2a7ch6Ul9 74vDw8gHEhZyCsd182yi1TUJPHdas0GjVpAVci3/3XRhQRTKCdvXF0ojoDgFNtasqMjR okXMOMavUvMrmvmgAcPp7ZsTeHwbvBKL9+tRdVc107m3BS2yWq+m1voN+ACeApt972TL +QJA== X-Gm-Message-State: AOUpUlFlwOmc+443lsycl2ByudRx9cTRFxGVUnPz/OFW1t89JsW4wdZn 5UxBwgCbwtUSCCUwjur05k0FtiOh X-Received: by 2002:a63:d80f:: with SMTP id b15-v6mr15507500pgh.347.1534129829186; Sun, 12 Aug 2018 20:10:29 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.71.57? ([2402:f000:1:1501:200:5efe:a66f:4739]) by smtp.gmail.com with ESMTPSA id c66-v6sm30854830pfc.138.2018.08.12.20.10.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Aug 2018 20:10:28 -0700 (PDT) To: akpm@linux-foundation.org, jack@suse.cz, mgorman@techsingularity.net, ak@linux.intel.com, mawilcox@microsoft.com, viro@zeniv.linux.org.uk, mawilcox@microsoft.com, ross.zwisler@linux.intel.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel From: Jia-Ju Bai Subject: [BUG] mm: truncate: a possible sleep-in-atomic-context bug in truncate_exceptional_pvec_entries() Message-ID: Date: Mon, 13 Aug 2018 11:10:23 +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 kernel may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.16 are: [FUNC] schedule fs/dax.c, 259: schedule in get_unlocked_mapping_entry fs/dax.c, 450: get_unlocked_mapping_entry in __dax_invalidate_mapping_entry fs/dax.c, 471: __dax_invalidate_mapping_entry in dax_delete_mapping_entry mm/truncate.c, 97: dax_delete_mapping_entry in truncate_exceptional_pvec_entries mm/truncate.c, 82: spin_lock_irq in truncate_exceptional_pvec_entries I do not find a good way to fix, so I only report. This is found by my static analysis tool (DSAC). Thanks, Jia-Ju Bai