Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp932774rwb; Thu, 10 Nov 2022 09:04:40 -0800 (PST) X-Google-Smtp-Source: AMsMyM4IaWmKa6xdSEMTNS6IW+/ry3EWyDzCGE2IkhBOZsPQ333WA/eTwVc296OpksRhKhmQ3B2l X-Received: by 2002:a05:6a00:4009:b0:563:9203:cc5c with SMTP id by9-20020a056a00400900b005639203cc5cmr2968323pfb.25.1668099880323; Thu, 10 Nov 2022 09:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668099880; cv=none; d=google.com; s=arc-20160816; b=Lpw/aQTCnPHfpBsCKshenaUsHpt9V/s7BpgK2VipBZnC0Azn64UlizeBV/6UTJPqBS YIo8HcUOF+/BWnVPZZbvi0Pied5BWKv09+Pv6RbKF0+4nVDCizI7bT9OcSRhXHNePalU po0G4uIX4QVLMeAfzQpfjEhOEizAMNXfXsdgfdpVwsJeh5YI+M9bVn6apGv/fdm5y2ep o9gs8wO2hcsEjKuAc4J96bWrtBYB+eSHFOr5pdc+8L/KCXMaA/Gyz9aZaNtQQv7Ppb3X MzYyXrXhD5WIgThHE18Qc0T3jDV8ofdHmgd3tyAe5o4Rux/yR+R7blO0fwzjQYBqJ2YY Ei/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Sh+Eq5Dk15P6ndaVpkL3ckTA6jJzcBON6KZfnjteXnU=; b=eYn7aeOQNYCZeGmH9yf3rWAl79jU0e6rhfWPnq+g/2QR+GPq/FDnaj0x/VDhC56JmP o9S1pl58sabCJBmxczTZtDIYkBHIEwtYiz63nK0gKKGxn5uQVYkZT5bbiVDDTobiBkT1 kJxP1ba73DqqJvvZdv2MfNDeciFxAvXDCVH2BAm6uDkV+HfOXqt537rLKjdCbC4vhWIe zR1OY8DGIUvAeg/y9p3zeUUzOIIv7ZCa61UcPso4EBo+/htvvYCJG7z8zhV+qGsAt5My 2T4OBFIBznyvQMIcyDwMLVu+I2ni+VxvH4+4PJX6rkvZCRy9exiD18vBK7zc6N33W047 voPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nOz95vtQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jb7-20020a170903258700b0018552c4f4c3si19069088plb.615.2022.11.10.09.04.26; Thu, 10 Nov 2022 09:04:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nOz95vtQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbiKJQGr (ORCPT + 92 others); Thu, 10 Nov 2022 11:06:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbiKJQGk (ORCPT ); Thu, 10 Nov 2022 11:06:40 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84F4E3F071 for ; Thu, 10 Nov 2022 08:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=Sh+Eq5Dk15P6ndaVpkL3ckTA6jJzcBON6KZfnjteXnU=; b=nOz95vtQlvdRV9Wyk0yMubFZo9 /ecJMZpJvGYHxyEsaydC1Mz7einS7Hc65UzuSRGjiue6CsglJ9V/oUr3TO0m/X0xOhYDdcNJUP6r7 8lLEJ44cGZ+g9TstpOa2887BrPUpc1OOGDEemN20sjoD30ikaEvs3Hgq09BfadXfGyZxemQzm3YJj lgdNA0WeHR7FEk04chP0xiNyqE343Gl0KA2Q/Z/ALVvAme2E4uvcKYmyfkGZmClV4UylqDJx2FcJa Xd1TvnXau51f4VWrdf3f+g8/GjN/ZmYQpLDHFvyCvYcOxlaQ3U96XvMWi+VizxGT4GLOW7nskO+Mo O+tK7Jmg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1otA4g-00CCCM-Sr; Thu, 10 Nov 2022 16:06:42 +0000 Date: Thu, 10 Nov 2022 16:06:42 +0000 From: Matthew Wilcox To: Rong Tao Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, rongtao@cestc.cn, wuchi.zero@gmail.com Subject: Re: [PATCH] lib/radix-tree: Fix uninitialized variable compilation warning Message-ID: References: <20221109162348.3dbde3a7942c303af012276c@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 10, 2022 at 01:00:42PM +0800, Rong Tao wrote: > radix_tree_load_root(root, &node, &maxindex); > - if (index > maxindex) > + if (index > maxindex || !node) > return NULL; No, stop it, you don't know what you're doing.