From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79BA3C0044C for ; Thu, 1 Nov 2018 18:46:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 289F62082E for ; Thu, 1 Nov 2018 18:46:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 289F62082E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727752AbeKBDuh (ORCPT ); Thu, 1 Nov 2018 23:50:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:41616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbeKBDuh (ORCPT ); Thu, 1 Nov 2018 23:50:37 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 000FD2064C; Thu, 1 Nov 2018 18:46:24 +0000 (UTC) Date: Thu, 1 Nov 2018 14:46:23 -0400 From: Steven Rostedt To: Thomas Gleixner Cc: Mathieu Desnoyers , Peter Zijlstra , "Paul E . McKenney" , Boqun Feng , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Andy Lutomirski , Dave Watson , Paul Turner , Andrew Morton , Russell King , Ingo Molnar , "H . Peter Anvin" , Andi Kleen , Chris Lameter , Ben Maurer , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Joel Fernandes , Sergey Senozhatsky , Matthew Wilcox Subject: Re: [RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram() Message-ID: <20181101144623.61d43102@gandalf.local.home> In-Reply-To: References: <20181101095844.24462-1-mathieu.desnoyers@efficios.com> <20181101095844.24462-4-mathieu.desnoyers@efficios.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Nov 2018 13:21:12 +0100 (CET) Thomas Gleixner wrote: > Mathieu, > > On Thu, 1 Nov 2018, Mathieu Desnoyers wrote: > > > It is encouraged to warn and return rather than use BUG_ON() when > > the condition can be recovered from in ways that are more graceful than > > halting the whole system. > > You're failing to desribe how that graceful recovery works. > I think the graceful recovery is to simply return: if (WARN_ON(cond)) return; is better than just BUG_ON(cond); As that's what Linus made pretty clear at the Maintainer's Summit. -- Steve