Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3405591imw; Mon, 18 Jul 2022 07:33:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u5Jt+TaEak3xB211fQD9Qr+TXSmDc+tIc8R2X2V1GT2EsKA0QEwO9AiTouNJtNSo5DC+TO X-Received: by 2002:a05:6808:198a:b0:33a:6426:5cce with SMTP id bj10-20020a056808198a00b0033a64265ccemr4754407oib.292.1658154821524; Mon, 18 Jul 2022 07:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658154821; cv=none; d=google.com; s=arc-20160816; b=ZG4svIYkzaw0fcSzRKbn0c+KutxQMGnQswdQ5zuPtEULkElgkI250sCwSSjgkrM9dY qy5Y9du6rutVhGmZcqZALvcV77uWTvGSw3ROuQ/ExQvvnQecx2QBApLxMvbKDDsxtpWZ 7aD9o8RzbP/++1GfjAnufdHfd9DcPHGz1h70MJlbSlZeXnd750Z8L1pSvBwCRLVU+pI/ acZtHaTr7HDjqFMmuMoLvO3lcrqQjCIHoldca/t/7pHqOe2GcIT4Lr6X9dysdsca+tIE FjJk3Ev10pa5+LAjLYkdwcoXFTlwhsSdeZROFcXSsvk8uHDeM5fGBeZigFZMWjMv6x6b PSmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=h4KM5yEf46msgpsSFjnp55Aq6lUgXSa55mbXUBWjCGk=; b=x+uoMgtsiKcTTIRMzA7Xa89LpU1mPW2wDSkhluTQXANzGkqDrc+4Jp6eUlbTaOIWRd qCBpbv0qyxSHAzvdWfv4iu54LdbAqv5F1G+egqRMu6oPxGAqwEDCvHpIjHtPkofDxM8f nAqikk7fMAeJZjJje/3zReZGPioTFe7gpKtefJmAXDZETan9n8n8yB+4FbJf+wHpNj/K aixtZJz2XPP4gnkHq+quBR1yA+Mo4YzPOZt6IUlbpJtOh2cxk3TyRiVhRq2r+4gp0B2x 50hQc1odH1+UCL1ZZKnlz7s7j5I3+uGfz4RKihd4UqlskxveHaYFWQj9jcXPUc57/cG1 PrXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="r/ahhqjz"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a0568708a0d00b000e2b5e832b1si9120277oaq.91.2022.07.18.07.33.28; Mon, 18 Jul 2022 07:33:41 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b="r/ahhqjz"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235311AbiGRONA (ORCPT + 99 others); Mon, 18 Jul 2022 10:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231547AbiGROM7 (ORCPT ); Mon, 18 Jul 2022 10:12:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 603142714C for ; Mon, 18 Jul 2022 07:12:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 01EA8B81614 for ; Mon, 18 Jul 2022 14:12:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC29EC341CA; Mon, 18 Jul 2022 14:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658153575; bh=lAyLGA1ga5i/mbtugNsD7EuylCnrcNL+KcACQIH7saE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r/ahhqjzE/83r0IZ2ZwRYQSad/9bPaGGh8JTrGbrCPQ3g4eLB2Qzkwh3zqLg03VZX IgrxoEEonU4Dj8YvJiJ/dAWSbGDAgY6se9ljv04OJZWDx+KDEtQueAB52E/ghYJDwi ziVDwcrE5vap2VTzpvpH4nQ3Rftcfp+CIyOZG9/qt6LexbPuXTH73oyQXSl7az7j2S 9ya770S+/20+qQ1tZ5hWveWI4E76DVamEPwDMJ17+ej9eBXNRmRs6ssMejG+Xpzg6p OolxABSP4l/G+zWjOEoFBV6QIGtirwK9OIm2TYWD2TNyow2da6p/5pgc58WfuLvQOa 5veWYcoLNupLA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oDRUT-008EOi-8o; Mon, 18 Jul 2022 15:12:53 +0100 Date: Mon, 18 Jul 2022 15:12:53 +0100 Message-ID: <87r12izeze.wl-maz@kernel.org> From: Marc Zyngier To: Xu Qiang Cc: , , Subject: Re: [PATCH -next 1/2] irqdomain: fix possible uninitialized variable in irq_find_mapping() In-Reply-To: <20220718130759.67777-2-xuqiang36@huawei.com> References: <20220718130759.67777-1-xuqiang36@huawei.com> <20220718130759.67777-2-xuqiang36@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: xuqiang36@huawei.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, rui.xiang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Mon, 18 Jul 2022 14:07:58 +0100, Xu Qiang wrote: > > In irq_find_mapping,ret value may be uninitialized.However,even if > the local variable irq is initialized, it only solves the uninitialized > problem and ret value is still an incorrect virq, so my modification > method is to set virq in __irq_resolve_mapping function. I think I understand what you are fixing, but I sadly don't understand the commit message. Here's what I suggest as a commit message: When using a NOMAP domain, __irq_resolve_mapping() doesn't store the Linux IRQ number at the address optionally provided by the caller. While this isn't a huge deal (the returned value is guaranteed to the hwirq that was passed as a parameter), let's honour the letter of the API by writing the expected value. Does this match what you expected? Thanks, M. -- Without deviation from the norm, progress is not possible.