Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1294407lqp; Mon, 15 Apr 2024 01:46:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi/PhnLhjce5ABmVoXM4mRCZ3npYRwY52RzmB0gZo448L6NoWWHtWwym3L2s/AYcnh3rttyhXhjqWYXqJ+QNfLKI86XGJAIc9nWfOvIw== X-Google-Smtp-Source: AGHT+IH2nDOE54w6PV8vVFUoN1K7ltfkeAmC9jq4CFhu0YvuS/lZCI7b2wJ7IUTHy4HuFN04RdLg X-Received: by 2002:a05:6808:481:b0:3c7:d04:4e4d with SMTP id z1-20020a056808048100b003c70d044e4dmr3382918oid.13.1713170790164; Mon, 15 Apr 2024 01:46:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713170790; cv=pass; d=google.com; s=arc-20160816; b=JKHpmf6J39O6CzQws8hQYM6Vau4ObFff6J7ypFore1SJpG+DisGeCH++SqUZtXNIpx bZaU5Nq1j7i8yTtKiB6zG5+uSrEbgAvUeycQXceN4pu8oD+x0aSSPCG1zxVYiePaoxuw Lgqflx8w6ySvDIJ8lloUxJ+ty59QUKYUtg9xXtv7zj0MVwK/ywcf6Vnk27w8DdQaIne3 g5Uxt0BOAVruJgB8oWqVS8xZSerkaiCa96IlB0sYkonCqwvnTxAoOPPG+H1aseLiKenu JRiebROpQ/yhSQehm7THutREl4U+TlBYqhEMOKdf91E0ZBc3ZXCQiqW9iiJ5t7Mnvrrt pNjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/YX6USCWJSVZiip4uuo05Pgl5yLVCXv3+OwpmFbpW20=; fh=Q2k2qJoxo2+Fk+H2r+CNCmgtl9ysTnoDoZywUhfkkzQ=; b=y+beHHvwEYyzKrEG+ZuyKvwyFbHwQyosfx1L5k+M7bYjMoL2s+gq08tYQ2InRsjLO1 H+mP2OfoeDI2/Bxo7hZ/0qpEQHSlfHEslevN9U53vYZw55GMJU6g2McIlFiYF8T9gFp/ QD5fw4auDxDlbc8j7GIXjhu++127gmawGKxxX84zb7eqsP97qTSusThYonRL7D+BEVei GtnWmKNLximWcSfgmeotXOzx69E7neVE0EB+o8dsQrtJHBmSd0OKlJz1/uIHjsyxR5o0 YbsqrNIKDNUZ5Gbuj/gYaYLV/uWI6bdMEMrOKVJOHdEqKog/FOmcPgRMuwnlx7OA5gFA 0KCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lDZIzck4; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-144788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144788-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e2-20020ac85982000000b004368bbda342si7598865qte.134.2024.04.15.01.46.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 01:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lDZIzck4; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-144788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144788-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DB25C1C20D56 for ; Mon, 15 Apr 2024 08:46:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 015CB3B297; Mon, 15 Apr 2024 08:46:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="lDZIzck4" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 162DE39856; Mon, 15 Apr 2024 08:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713170783; cv=none; b=eH5+F8qXSOI3CpO2eTSf8joiDn0zzRHLWzApi69SUmup6fJ+swljFSJjnnpUdD8HzRd2/aDkNtgMNZEZWtjH/vZyygirbw5MUsrByFzFYHJeCgaQSHKewU0fQBVZgdee6h6AWAvaGYLN1TFPTRb8Ceh2s0jBnZlWRmaQo94++dM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713170783; c=relaxed/simple; bh=cPXg3aPIXYU2ij/Q5bT/qYLiuY6yQzabqRA3oLzr0x4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HtLtTdj1HLyPJrz+L97iM8jET9RgsUavYzxn97w5IvZDoPsIuhANIfVHh7oYJNzrDVE3bW3xX9rBrI099ihMpVy9NAnv95xemRR9qp1rtygY91XLPdH7ZBnLCmBUVHPfgyS7dx5cL5UJYSUbi/xhQ8Uvx03o+589LFjj1yhipB0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=lDZIzck4; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/YX6USCWJSVZiip4uuo05Pgl5yLVCXv3+OwpmFbpW20=; b=lDZIzck4gsUveDH5ZPPkHWpRM2 7AXDgH2y/ktk2EAWhjpS5SYvHXyJo6YJ/5XM/qYf/0XFrOTVtUr9/wEzl1SUkEQpgI7893ycyIp1m oy9HC2kVOJ6AHE1PcFvU1ThJ2MNVnkZRFRMEOeqACfTP7Ex2f1BxP1Ev4o5C3M8Ce8rHeJ5xLHAMu smr3AQqcLzLrszlF/6D1vxW3rq2nwYGz3RKjeOHwtD5P40WiI7cvImvL4pt5zca7tDUpJoOmOjuCr x5vjv/GOz+j4sp/y4an+SQaVQPnM+kT4EvaedTp5ekyO8fzwl4l9J7wODdtEalKFK2YF7DgQzsfqM ohpcAmbA==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwHym-00000007b7Y-22mH; Mon, 15 Apr 2024 08:46:20 +0000 Date: Mon, 15 Apr 2024 01:46:20 -0700 From: Christoph Hellwig To: Greg KH Cc: Christoph Hellwig , Alex Elder , corbet@lwn.net, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation: coding-style: don't encourage WARN*() Message-ID: References: <20240414170850.148122-1-elder@linaro.org> <2024041544-fester-undead-7949@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2024041544-fester-undead-7949@gregkh> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Mon, Apr 15, 2024 at 10:35:21AM +0200, Greg KH wrote: > On Mon, Apr 15, 2024 at 01:07:41AM -0700, Christoph Hellwig wrote: > > No, this advice is wronger than wrong. If you set panic_on_warn you > > get to keep the pieces. > > > > But don't add new WARN() calls please, just properly clean up and handle > the error. And any WARN() that userspace can trigger ends up triggering > syzbot reports which also is a major pain, even if you don't have > panic_on_warn enabled. Important distinction here: WARN_ON_ONCE is for internal error checking and absolutely intentional, and does not replace error handling, that's why it passes the error value through. OF course it should not be trigger by user action. > And I think the "do not use panic_on_warn" recommendation has been > ignored, given the huge use of it by vendors who have enabled it (i.e. > all Samsung phones and cloud servers). Sucks for them.