From patchwork Wed Jan 15 06:09:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 11333387 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BED2C14B7 for ; Wed, 15 Jan 2020 06:09:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 97FAB24683 for ; Wed, 15 Jan 2020 06:09:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97FAB24683 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CAC118E0006; Wed, 15 Jan 2020 01:09:39 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C5D7A8E0003; Wed, 15 Jan 2020 01:09:39 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B71FF8E0006; Wed, 15 Jan 2020 01:09:39 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0251.hostedemail.com [216.40.44.251]) by kanga.kvack.org (Postfix) with ESMTP id 9EA4C8E0003 for ; Wed, 15 Jan 2020 01:09:39 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 5C721181AEF07 for ; Wed, 15 Jan 2020 06:09:39 +0000 (UTC) X-FDA: 76378842078.16.snow81_542fdc114fa09 X-Spam-Summary: 2,0,0,2922163799825c34,d41d8cd98f00b204,yang.shi@linux.alibaba.com,:akpm@linux-foundation.org:yang.shi@linux.alibaba.com::linux-kernel@vger.kernel.org,RULES_HIT:41:355:379:541:960:973:988:989:1260:1261:1345:1437:1534:1539:1711:1714:1730:1747:1777:1792:2393:2559:2562:2892:3138:3139:3140:3141:3142:3350:3865:3867:3871:3872:5007:6261:7903:10004:11026:11232:11473:11658:11914:12043:12114:12297:12438:12555:12895:13069:13161:13229:13311:13357:14096:14181:14384:14394:14721:21060:21080:21627:30054:30070:30075,0,RBL:115.124.30.132:@linux.alibaba.com:.lbl8.mailshell.net-62.20.2.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: snow81_542fdc114fa09 X-Filterd-Recvd-Size: 1764 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 06:09:38 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0TnmuvRl_1579068565; Received: from localhost(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0TnmuvRl_1579068565) by smtp.aliyun-inc.com(127.0.0.1); Wed, 15 Jan 2020 14:09:35 +0800 From: Yang Shi To: akpm@linux-foundation.org Cc: yang.shi@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: mempolicy: use VM_BUG_ON_VMA in queue_pages_test_walk() Date: Wed, 15 Jan 2020 14:09:25 +0800 Message-Id: <1579068565-110432-1-git-send-email-yang.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The VM_BUG_ON() is already used by queue_pages_test_walk(), it sounds better to dump more debug information by using VM_BUG_ON_VMA() to help debugging. Signed-off-by: Yang Shi --- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 067cf7d..801d45d 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -621,7 +621,7 @@ static int queue_pages_test_walk(unsigned long start, unsigned long end, unsigned long flags = qp->flags; /* range check first */ - VM_BUG_ON((vma->vm_start > start) || (vma->vm_end < end)); + VM_BUG_ON_VMA((vma->vm_start > start) || (vma->vm_end < end), vma); if (!qp->first) { qp->first = vma;