Received: by 10.192.165.156 with SMTP id m28csp1540543imm; Tue, 17 Apr 2018 00:41:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ZgHeFkUnEN1kr8ID3VMtuvlfoyvTG+0DiGEMC+3R0rPhj9eetKuZazW7F94y2lJZ1raaR X-Received: by 2002:a17:902:8a8a:: with SMTP id p10-v6mr1055731plo.251.1523950886447; Tue, 17 Apr 2018 00:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523950886; cv=none; d=google.com; s=arc-20160816; b=BY2Gihtnu/9YvJXoRLp45CGpIfRechBtXFVTtrIXPJ8ODm3tbMgc1ym9T+K8keV7Qj WkohfLNl1J3uYYvAtYBacMK8RX2m6T3SJlLGX2Nn0cWEABH2arApbDzoD/u3p78wtrHW njv2NeNnV48EA3rEmlOllze/zBjVcdxSeJmAGZA5eytNBlohj1iXE1sKxVBwCYEHacao OMqKpIpxvrMR6Jx0l8Q/Jw7DJRaLuKMSwAg1NkwFsrWcEauU1o/QnT6+NHj829niM9wX KLp8D8j6ZRZNYYYEOr94WaaHIScPODopF3VCKNRmrSFboQKYqx8ZbvOPByGQGAcWusgr LnpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=BIdWrJnK6jl6yaMVDkWYWa7HVgvEkZQEOhGx7TWpqqM=; b=JO9QqjMGi0FAYdR8ZGWKI5mZHb1mctIOnAmJpqU3WZrEqsn8nO3leL1izLDts+CroP coM1od/b4bLURop5ZMLkBSaEm0J+xNXjwakQzvHwvGI2EeJGCyeSEFeN8afrcFI1Xfl0 HmbG9GJjG+8iLoEANaLtfEnLy25At6/C/tPSdjWxQEyX9gnOEk8u7AqCTB1XeFuFCvzB E0O8DQSTUeC3jdCs6moed98hdLzoIDWNZc0BAE/P0cnVNM7qczqv99TFh4AN2pwf4jme FZhcafgBajTlcuHBThyd+R9iu9v2P6/lGiqX0TcOZ9uk/Jr51jJjeza9eVoJssmQgeSU iD/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=vx4XXegC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65-v6si6348662plb.301.2018.04.17.00.41.12; Tue, 17 Apr 2018 00:41:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=vx4XXegC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752647AbeDQHjd (ORCPT + 99 others); Tue, 17 Apr 2018 03:39:33 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:46618 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeDQHjc (ORCPT ); Tue, 17 Apr 2018 03:39:32 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3H7ab7V192282; Tue, 17 Apr 2018 07:39:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=BIdWrJnK6jl6yaMVDkWYWa7HVgvEkZQEOhGx7TWpqqM=; b=vx4XXegCnMaGVwfCEavRoa78thjNfxhUSSeYm73KDVfiC9e6XPtsCzNUHAh8uXHQoQvU h6agmdn4fy9n8YwDdUEcyDIkafGXbXIyqsD3wbH8HKbNrnMUcdE0NuJTpGqU71Y9YKUV 5CIyEyXoe90lBpwMf/IovKXcwOrgpmQXWiecWcHda/AgXVyQMwcOAVaUFgTLxeAQ5mZO kBCRPaHsUG6Mx9IHGEaPBhscXC2kPa1e6Bcx4bRtjeTi3ZIWTIZhkiYS5LCKtMK557gT lZDSolrFRjQnQ01yuEUGGNwPSb+bPAn8a9Ct+OKgX5GKKY1zDkEbKRljh+XOtKdvk6I4 Zg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2hbam58ehj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Apr 2018 07:39:12 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3H7dC3I006876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Apr 2018 07:39:12 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3H7dBWc025308; Tue, 17 Apr 2018 07:39:11 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Apr 2018 00:39:11 -0700 Date: Tue, 17 Apr 2018 10:39:02 +0300 From: Dan Carpenter To: James Simmons Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin , NeilBrown , Dmitry Eremin , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 18/25] staging: lustre: libcfs: clear up failure patch in cfs_cpt_*_print Message-ID: <20180417073902.slxgixniiytw7guk@mwanda> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-19-git-send-email-jsimmons@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523851807-16573-19-git-send-email-jsimmons@infradead.org> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8865 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=370 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804170069 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -err: > - if (rc < 0) > - return rc; > - > return tmp - buf; > + > +err: > + return -E2BIG; We finally fixed this bug! Hooray! But it's like you guys are deliberately writing in terrible style. You can just return directly and then you would have avoided this bug altogether from square one! People think that by adding little twists and moving code to the end of the function the it will be less buggy. It's not true. It's like at a hospital if they just swept the cockroaches under the bed, just because it's at the end of the function where you can't see it or review it doesn't mean it's not buggy. regards, dan carpenter