Received: by 10.223.164.221 with SMTP id h29csp2227207wrb; Thu, 2 Nov 2017 07:45:10 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RrGKj4QonidlLo9frTWFJ0bmw0w3o7jW/pXsjoW5onlvswcSsbUZh+/r2Upl5b+H0cqFTx X-Received: by 10.159.207.147 with SMTP id z19mr3459349plo.441.1509633910848; Thu, 02 Nov 2017 07:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509633910; cv=none; d=google.com; s=arc-20160816; b=vfqf/AdgAge2sWT+hwmznjGsYoQb9gWHBMmHsQ9mKKVFpbOp1jqGiqL+Y0qLs2eD9X P25XwhJTXpcKDm0w+oj+KWcUfjKFY+Z8JKzrC7LzP+jruR+e0dI/csy6j2h8LwP6mAhE z+pJIoJNq+wTqBSNV81YD8lxNVjHVjbhYearC2Vy28JeBsxBFZCJlruV1IDDlgpl4ZX1 ysE2IVZEKvasYgmcWYzuuGnB/a7rm/bAUVolDlthhFZsyLt+jS5lSVhmYDpJEhhXlAY7 oOuPPXOCOHFaO6ZxOmujgQ1UHjkzzUHqIyZw7LgExfBGZ2WMK2gWBIfc4PQBXYFcJ7Tt C4Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=YoN+KCoNmEIjBNEZ0/mswDkPA3ZSlkt3wTH1KibwCJE=; b=ynD/m4g2Qhbx/34jLXooO0M5S6S55Pq3QR6gsMjkqvK4O0JsxSTjOXHbHPxyBI1n4i 4kDLSNuPdyVRv09loCakBLY+yeD5K8+hL4E8Z/p01sC7wysGSeEkFd254nQ1keRrK4g2 JVe/ucSlUOx61bRBg5EQ9Nveb/6iV8tNPRG6JNF95tOqvhYKOvzN3IhbUCg1kcCTpXjD 4rjaM3KQzUS/cfzycErWkTxgewkIUh+ipY2PkhBfka7VrhgHOmFyTCqF0yq3H6WDps8l DxXF7QORJx0/MWPLI3U6Rokn4nDEJNlb38Cf9rR5O7Y57AUZ8ZzM7zwkyY8X5kLpOWr/ PA2A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 y65si3997928pfi.384.2017.11.02.07.44.57; Thu, 02 Nov 2017 07:45:10 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933625AbdKBOoQ (ORCPT + 96 others); Thu, 2 Nov 2017 10:44:16 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:34926 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933448AbdKBOoP (ORCPT ); Thu, 2 Nov 2017 10:44:15 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA2Ei4Ft012980 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Nov 2017 14:44:05 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA2Ei4Kt026248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Nov 2017 14:44:04 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vA2Ei3ht021453; Thu, 2 Nov 2017 14:44:03 GMT Received: from [192.168.1.74] (/99.156.91.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 02 Nov 2017 07:44:03 -0700 Subject: Re: [Jfs-discussion] [PATCH] jfs: Add missing NULL pointer check in __get_metapage To: Juerg Haefliger , jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20171004082441.2405-1-juerg.haefliger@canonical.com> <1dbf4a54-968f-0ca7-da96-e262c653fecb@canonical.com> <778bc3d1-4bf4-ed83-3cc3-19d6efb5cceb@canonical.com> <0c8c1f0e-c3af-308f-aee0-d7b8c14f45d8@oracle.com> <50f61041-7507-6410-ddf5-36892759be8b@canonical.com> From: Dave Kleikamp Message-ID: <30b7320e-3fd4-71b7-3aa4-c62cbf49aa14@oracle.com> Date: Thu, 2 Nov 2017 09:44:03 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <50f61041-7507-6410-ddf5-36892759be8b@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/2017 08:43 AM, Juerg Haefliger wrote: >>>> Furthermore, it looks like all the callers of __get_metapage() check for >>>> a null return, so I'm not sure we need to handle the error at this >>>> point. I might have to look a bit harder at that, since there are many >>>> callers. >>> >>> I don't understand this either :-) Yes, the callers do check for a null >>> pointer but things blow up (in __get_metapage) before that check without >>> the above fix. >> >> Yeah, the fix to __get_metapage() is necessary. I'm not convinced the >> first part of the patch, to alloc_metapage(), is necessary. > > It's not. I just thought it'd be nice to get some sort of notification > in the log when the alloc fails. But if the callers log it then that's fine. Okay. I'll push just the __get_metapage part of your patch. Thanks, Shaggy From 1582962166939183221@xxx Thu Nov 02 13:46:02 +0000 2017 X-GM-THRID: 1580314796840603396 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread