Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1103940pxu; Wed, 6 Jan 2021 12:21:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3SBO5NxI5yXtNFQDmV2T387bZlZvztFHGvyQ+Rd4vDarc60oLqHwTRVrYuHmrnb4vMGzS X-Received: by 2002:aa7:dd17:: with SMTP id i23mr5116763edv.14.1609964501630; Wed, 06 Jan 2021 12:21:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609964501; cv=none; d=google.com; s=arc-20160816; b=GFnq+YvEiNEELY5OKqRXcxdhbD3mIr8Z9cgj43OsZri8O97NXdOD4cbQO5jJ7v5cS1 q19DYToB+X0aMnZnXPXiyKpgZ7f6Ht/2dhN0orvRKoxXZgwR1UDnxdi6Wennzoj0n6br HQRt2XCtktn4BorTFYfbzjtt2NnvfqO1CScYZ75j/5uU6JEd9QMvN3RTTfCt2Lo7E1TC gtDfXQeEqr/9+DoJwRPi8tnUv2FKGTi+E30qpnSf1upvQ4p/xDxIK84tS3YXJFx3qeHU e0sNMOOgTFiuvbU4QYIEVkTGTXTVKXdQeQQqWcw8/YQU4MpZeAebRkUlJF9s8mPhLYP7 CyNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=iJJgoSbyLyAY5ybGUsqGtrthU9HgytjNnp54LxffTUQ=; b=a5bslHnVgaRObdcGT/KxbgvQYXxb7uh72+8ER0LC+Dt76BochaPl9R/GydWynejy7Z g7kI1X27qRm9n29+5DoUcwpjfhASr5Tp2GtRMROkpR96nLcjedxh6QyVT+UBirS85frR CdFHUy6dWkZoWYwIp3BVZLbiYtoeLfTp/5c7CuOXQxsOVPkNijxi73AciuBnyz9vsHc7 UGr7oxtJmUFrQoJ+yqVyplhotf2+t+3FVkpfGPYCMsgivy5ReoL4g88cukOuRp83+yiW /CN5/OaTm+DyzMsRLR777oCO942kX5LmU3GcyDRU27I5BLbGUz/3xs0TO80DmqxL5gb3 3wGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n18YKI9j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 97si1392370edr.112.2021.01.06.12.21.18; Wed, 06 Jan 2021 12:21:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n18YKI9j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbhAFUT3 (ORCPT + 99 others); Wed, 6 Jan 2021 15:19:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726730AbhAFUT2 (ORCPT ); Wed, 6 Jan 2021 15:19:28 -0500 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8211C061575 for ; Wed, 6 Jan 2021 12:18:47 -0800 (PST) Received: by mail-ot1-x32b.google.com with SMTP id i6so4229578otr.2 for ; Wed, 06 Jan 2021 12:18:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=iJJgoSbyLyAY5ybGUsqGtrthU9HgytjNnp54LxffTUQ=; b=n18YKI9jp+HXb5AmIc1F8DYthoi2MZWrs68850q3/7Y1oC2mbTRPxOlZKOAueyliX7 1I5V8B8dipw2MlR3de+e6ly9CXjr/nMkUgI5+KEQmPS0qGpgAyWM7/kTtnpHJdkdVZrS 9HQeY5ROuADlcLJa7VXZC1o9PoWzHpZ8czJhuXEWT6FmoTC4ZLuGma8j0KowQGnJsgRx oKHoUWktsvyUZa+6guYPI+pf0knN1C44eNG0sAXIdn7OhDq0xgRjKAJcc4vYqmVt3y6b WU8dm/lEz2rKL+6FwmdiJYILhZKWEfV9Jqwim4FFwyOBhyxSN0FQYDKe0YkaqtSW8tS8 pm8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=iJJgoSbyLyAY5ybGUsqGtrthU9HgytjNnp54LxffTUQ=; b=UzX/0GHa+P7dqm7Y9g15NRHNa0YgkAePpzEJ4lm6ClUh24ZNeehK08cdUT8Qpiqewz /qmYhvgPwLijPMxkJoRMqflwMVrUDPzaYN2XezVV+9uGe9k8d3qvoMYFUUSDHGVhll1E n00tkkKKKiEXaCx4BfKx/M7zULzEYSh7fS6phy7NO4hoOjWcqoJBI6FOOCaYAFN2Gbqi Z/KBsoN9BnJGuPBlgxnFfJ/EHOTwYPiiPK4kRQRn+IzQpBr0QI9Lw7jUQbSaPso+dHiO zj+LmAqCOxwSZDvhzgUjaTptb78OleH9YYUFkGVMhAf0K6zGkcxoTFSNO3QplEDpYmvo AQIg== X-Gm-Message-State: AOAM531Dc3EyHsulUKLLydbWnCV8zpiygS1WLqNQBtw3y8T4qC/ECc9D Z+KySganM4bKuTVfPFPtLPeP0A== X-Received: by 2002:a05:6830:20c2:: with SMTP id z2mr4305329otq.322.1609964327126; Wed, 06 Jan 2021 12:18:47 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id y84sm820819oig.36.2021.01.06.12.18.46 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Wed, 06 Jan 2021 12:18:46 -0800 (PST) Date: Wed, 6 Jan 2021 12:18:36 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrea Arcangeli cc: Andrew Morton , Hugh Dickins , Alex Shi , Minchan Kim , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/mmap: replace if (cond) BUG() with BUG_ON() In-Reply-To: Message-ID: References: <1607743586-80303-1-git-send-email-alex.shi@linux.alibaba.com> <1607743586-80303-2-git-send-email-alex.shi@linux.alibaba.com> <20210106114620.5c221690f3a9cad7afcc3077@linux-foundation.org> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Jan 2021, Andrea Arcangeli wrote: > > I'd be surprised if the kernel can boot with BUG_ON() defined as "do > {}while(0)" so I guess it doesn't make any difference. I had been afraid of that too, when CONFIG_BUG is not set: but I think it's actually "if (cond) do {} while (0)".