From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f70.google.com (mail-it0-f70.google.com [209.85.214.70]) by kanga.kvack.org (Postfix) with ESMTP id 8DCB96B0038 for ; Fri, 19 Aug 2016 09:07:32 -0400 (EDT) Received: by mail-it0-f70.google.com with SMTP id j124so85084960ith.1 for ; Fri, 19 Aug 2016 06:07:32 -0700 (PDT) Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com. [209.132.183.37]) by mx.google.com with ESMTPS id l193si4701583ita.54.2016.08.19.06.07.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Aug 2016 06:07:31 -0700 (PDT) Date: Fri, 19 Aug 2016 09:07:21 -0400 (EDT) From: Pankaj Gupta Message-ID: <945408416.2306040.1471612041111.JavaMail.zimbra@redhat.com> In-Reply-To: <20160819124508.GM8119@techsingularity.net> References: <1471608918-5101-1-git-send-email-pagupta@redhat.com> <20160819124508.GM8119@techsingularity.net> Subject: Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if empty lists in free_pcppages_bulk' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, riel@redhat.com, hannes@cmpxchg.org, iamjoonsoo kim , kirill shutemov , izumi taku > > On Fri, Aug 19, 2016 at 05:45:18PM +0530, Pankaj Gupta wrote: > > While debugging issue in realtime kernel i found a scenario > > which resulted in infinite loop resulting because of empty pcp->lists > > and valid 'to_free' value. This patch is to add 'WARN_ON' in function > > 'free_pcppages_bulk' if there is possibility of infinite loop because > > of any bug in code. > > > > What was the bug that allowed this situation to occur? It would imply > the pcp count was somehow out of sync. Yes pcp count was out of sync. It was a bug in the downstream code. > > -- > Mel Gorman > SUSE Labs > -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755016AbcHSNHn (ORCPT ); Fri, 19 Aug 2016 09:07:43 -0400 Received: from mx5-phx2.redhat.com ([209.132.183.37]:47689 "EHLO mx5-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754167AbcHSNHl (ORCPT ); Fri, 19 Aug 2016 09:07:41 -0400 Date: Fri, 19 Aug 2016 09:07:21 -0400 (EDT) From: Pankaj Gupta To: Mel Gorman Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, riel@redhat.com, hannes@cmpxchg.org, iamjoonsoo kim , kirill shutemov , izumi taku Message-ID: <945408416.2306040.1471612041111.JavaMail.zimbra@redhat.com> In-Reply-To: <20160819124508.GM8119@techsingularity.net> References: <1471608918-5101-1-git-send-email-pagupta@redhat.com> <20160819124508.GM8119@techsingularity.net> Subject: Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if empty lists in free_pcppages_bulk' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.65.193.88] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF48 (Linux)/8.0.6_GA_5922) Thread-Topic: Add WARN_ON for possibility of infinite loop if empty lists in free_pcppages_bulk' Thread-Index: jseHfo1om4wLGDi5hVYb8q5oQbRbiw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On Fri, Aug 19, 2016 at 05:45:18PM +0530, Pankaj Gupta wrote: > > While debugging issue in realtime kernel i found a scenario > > which resulted in infinite loop resulting because of empty pcp->lists > > and valid 'to_free' value. This patch is to add 'WARN_ON' in function > > 'free_pcppages_bulk' if there is possibility of infinite loop because > > of any bug in code. > > > > What was the bug that allowed this situation to occur? It would imply > the pcp count was somehow out of sync. Yes pcp count was out of sync. It was a bug in the downstream code. > > -- > Mel Gorman > SUSE Labs >