From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36821C10F14 for ; Wed, 10 Apr 2019 16:31:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 08053206DF for ; Wed, 10 Apr 2019 16:31:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UwZIpfaS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08053206DF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V6uaulfZUIZqzRw+4ZigLx7CNBnvf5ZyrjxaZUFf4ks=; b=UwZIpfaS8HXRPW k2ZqoE57Pr5BArjwQeCxtETg9XpqMhI0H+dB9ByUMGnX/fLcrsctctDCm6FkyrU8SjUK7WZfn54Po YcZWjONw8z4jsLsZAuOJUgKVtJS+lXhNPeDq4WokwovSf0g9ZjyT883KxP7Yquinm87heKi7ARg3B hX0KeGAyzvVJdPWABt+jNgDXa84CFbownxJqpundNT7hPh/UC2AqS/vKLu3cC37tFgsC04MyaK+ky wK60jaC5VrbARgINz3EhFvI9vTXn8DVj2Ot08yx0SL0XBgDBl/XJiKCoCff2nhqPEJGPi8uz+XX3P QkAaXVybvao6UzcJAi1Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEG8M-0005oo-Hn; Wed, 10 Apr 2019 16:31:34 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEG8K-0005oQ-5b for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2019 16:31:33 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3DE0B374; Wed, 10 Apr 2019 09:31:31 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0B3D93F59C; Wed, 10 Apr 2019 09:31:29 -0700 (PDT) Date: Wed, 10 Apr 2019 17:31:27 +0100 From: Sudeep Holla To: Kangjie Lu Subject: Re: [PATCH] firmware: arm_scmi: check return value of idr_find Message-ID: <20190410163127.GG3952@e107155-lin> References: <225abd6e-4551-213d-367b-93d938789188@arm.com> <20190325204823.5428-1-kjlu@umn.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190325204823.5428-1-kjlu@umn.edu> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190410_093132_218189_9E4F3E77 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Steven Price , Sudeep Holla , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, pakki001@umn.edu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 25, 2019 at 03:48:22PM -0500, Kangjie Lu wrote: You should mark this v2 id you changed any code or commit message or added any tags. Just FYI for future. > Thanks for Steven Price's review of this patch. In the current code, > idr_find won't return NULL because the SCMI_PROTOCOL_BASE id must > exist. However, it might return NULL in the future code if the check > is on another node while processing the children in subsequent calls > to scmi_mbox_chan_setup(). I don't understand the reference here to future code here. If you have out of tree code that results in such a scenario, please share or provide the details on that. As I mentioned in previous mail, I would bail out much earlier if SCMI_PROTOCOL_BASE is not allocated IDR and not reach to this point. We continue even if scmi_create_protocol_device fails for few child devices. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel