Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2877181imm; Mon, 13 Aug 2018 01:58:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxKN7QyFuO5CnEz+lvSD3ad97CJZWd5O6gaR4bnEpMoVBjbvyHeDgDbJQg8nPSJFxlo/978 X-Received: by 2002:a63:e914:: with SMTP id i20-v6mr16151701pgh.10.1534150712890; Mon, 13 Aug 2018 01:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534150712; cv=none; d=google.com; s=arc-20160816; b=t3QzXNt7cQWlH70eljxErCBVsmelVAN7CeTUUpGCWgvJKkkqadkYT9IVnJZn794ITW h7y0Pj+Q/O44+WFifPh+mlAQoV+xBNPZKeZ7JAq0BrH8C5uEOEILC1YeT9WKhgojX0Lw viOvNOPG7tsqWnFhvMH7dp7V2dS7aSzCvaOXoTPmoWmh+19ZvEidjnultvBt5/2tLvXd q2iqJNQNMDx9xrLGmWrUcxekUpEDKwfjTbyBtmOHcb4IPIOAXOI4giHroLb6lZmbFUAF 0Muy5m4Qj33WhBYB6YJ1cdF3ePDAeknL2uF2dhJsLE/qlBjikIITy264xgEoUE9tXOK1 a64w== 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:arc-authentication-results; bh=VdS8rdCMess4fUtKx326wv9HXC/0LrUM8eYvGm1MVZQ=; b=yt8uMwAjnHKGP0sxRvcgLVS24fetkCi0GmrHnolHqh9Vvl/WmhgzmXouYl1c3WwoYR 5WkJqIhQVDQaxSTb4dig40YcysrI4X5z3ZiMpvAPtl+bdnbJHWBidTCkevj+HKylCfCB R791xCe8vwgjN9OE14BuA8/8dNs5yYOKMhB7SBafCLDnq+YrxpeY5ANuCpwf1K9azwc7 NQ2FV+ustK73YHmn0Bj717yGro8OGbDNarJ8zFwIJcBuf2TveBbaqMZkcUZdIHa8Lb8c ZT549jJ1ilaOtzQGSqdiYxRu3JRQ77TWtCRL+HaY3j4oRhi6HMgZcVL4wbH1wmuMnnp4 JzuQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f200-v6si19635892pfa.164.2018.08.13.01.58.17; Mon, 13 Aug 2018 01:58:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728701AbeHMLhz (ORCPT + 99 others); Mon, 13 Aug 2018 07:37:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:56026 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728215AbeHMLhz (ORCPT ); Mon, 13 Aug 2018 07:37:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 522A0AD3C; Mon, 13 Aug 2018 08:56:36 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id E17BC1E051E; Mon, 13 Aug 2018 10:56:35 +0200 (CEST) Date: Mon, 13 Aug 2018 10:56:35 +0200 From: Jan Kara To: Jia-Ju Bai Cc: akpm@linux-foundation.org, jack@suse.cz, mgorman@techsingularity.net, ak@linux.intel.com, mawilcox@microsoft.com, viro@zeniv.linux.org.uk, ross.zwisler@linux.intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel Subject: Re: [BUG] mm: truncate: a possible sleep-in-atomic-context bug in truncate_exceptional_pvec_entries() Message-ID: <20180813085635.GA8927@quack2.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon 13-08-18 11:10:23, Jia-Ju Bai wrote: > 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 for report but this is a false positive. Note that the lock is acquired only if we are not operating on DAX mapping but we can get to dax_delete_mapping_entry() only if we are operating on DAX mapping. Honza -- Jan Kara SUSE Labs, CR