From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f199.google.com (mail-io0-f199.google.com [209.85.223.199]) by kanga.kvack.org (Postfix) with ESMTP id C459A6B000E for ; Tue, 6 Mar 2018 16:48:57 -0500 (EST) Received: by mail-io0-f199.google.com with SMTP id s21so489939ioa.7 for ; Tue, 06 Mar 2018 13:48:57 -0800 (PST) Received: from userp2130.oracle.com (userp2130.oracle.com. [156.151.31.86]) by mx.google.com with ESMTPS id z6si10951982iod.214.2018.03.06.13.48.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 13:48:56 -0800 (PST) Subject: Re: [PATCH] mm: might_sleep warning References: <20180306192022.28289-1-pasha.tatashin@oracle.com> <20180306123655.957e5b6b20b200505544ea7a@linux-foundation.org> <20180306125604.c394a25a50cae0e36c546855@linux-foundation.org> <20180306132129.45b395d9732b6360fa0b600d@linux-foundation.org> From: Pavel Tatashin Message-ID: Date: Tue, 6 Mar 2018 16:48:31 -0500 MIME-Version: 1.0 In-Reply-To: <20180306132129.45b395d9732b6360fa0b600d@linux-foundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Steven Sistare , Daniel Jordan , Masayoshi Mizuma , Michal Hocko , Catalin Marinas , AKASHI Takahiro , Gioh Kim , Heiko Carstens , Yaowei Bai , Wei Yang , Paul Burton , Miles Chen , Vlastimil Babka , Mel Gorman , Johannes Weiner , LKML , linux-mm@kvack.org > That's why page_alloc_init_late() needs spin_lock_irq(). If a CPU is > holding deferred_zone_grow_lock with enabled interrupts and an > interrupt comes in on that CPU and the CPU runs deferred_grow_zone() in > its interrupt handler, we deadlock. > > lockdep knows about this bug and should have reported it. > I see what you are saying. Yes you are correct, we need spin_lock_irq() in page_alloc_init_late(). I will update the patch. I am not sure why lockdep has not reported it. May be it is initialized after this code is executed? Thank you, Pavel -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org