Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1608341ybh; Mon, 20 Jul 2020 02:43:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoC1c6hfJs8GqpTEKimWZB1Fx6IkYdhXc0IHjM+Zl+moi3McybYT+6OcswFh/WFLANR0vl X-Received: by 2002:a17:906:594c:: with SMTP id g12mr19945284ejr.255.1595238197966; Mon, 20 Jul 2020 02:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595238197; cv=none; d=google.com; s=arc-20160816; b=RJ1nKSost8hxBJwIAyPzpTKFeF8uNi0kwJMd5l+jJ3Fq9BGgLmQb+IzXiVTqBCqQKX 6uAH+Eju7NC+jR4jOzldH2LZ4Gsq/0G7MYzIO5mXeAU+qj4iHNxPijX2yoL5IKGqT8XU FNjU7UC4lWsAvYAr/JFJD9WoGFvsfPBw6JEFx3Himvlt/Dj0o26owb73au5T6IPVfNgN xq3DdevKlZ7SNZsUaqORPYmjAFraCO1+MJ4Cr9Er9yaMzTD15fspXXD6E0ovVlQRGhsQ VUlM67SurR5Hs4M3j9Soz0pqTAk2NPAIv8XKeXHr5JOoeCmm1DUwAAWIyxiYrg0X2OPF il2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=+a+OgeBANKFuGXB0Vdh5PrXcg22QjgsiqPAyOrbjp74=; b=A2vWynl9Dko/E/VAeGmeNp19jG7FRJro4fn3ahFq/bhdjcwUrahvsB8U6c4f2bXe+/ 7/7w1qBsUiYpLq9rELsvj78bqJgOnLe2TGtp7OTCgdcQCIrkLMFefk2/cpTzD7mlnsLh FCdgD9wY/yxAixRknHylXsVIWUtEDeHxGrn0A9NYmOxY/o0xzUJi2y1B2tU7BW211Rrg B8f95trdGMBHJ7U2IU3insu3FKs2Ux3cpdFbPm2GL5k7uneWNsu1x68jdeuLzwDNCoUC tTtvCLl4KwNrRcQMjNlDzOCOP1vuhRS/NhiZBId3aNwIsLwevy7Q8Sj0wImE2jdEmFmp 5HlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Cl+avh4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn15si10598346ejb.513.2020.07.20.02.42.54; Mon, 20 Jul 2020 02:43:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Cl+avh4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728323AbgGTJmY (ORCPT + 99 others); Mon, 20 Jul 2020 05:42:24 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:42693 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728077AbgGTJmY (ORCPT ); Mon, 20 Jul 2020 05:42:24 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1595238143; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=+a+OgeBANKFuGXB0Vdh5PrXcg22QjgsiqPAyOrbjp74=; b=Cl+avh4aLe1FC0zcnEShtSdP5Vu91LzdVn7xMn2cv3zj1rj/jQ0geVRARahlPhvAIgwkIOPj zqgEsM4iU5pNZmm48v4c/7I7e9O+6y+NEwKGHBXjHtUpCPs6v5j8p9tcQk4IhaSEcEqiWrJ8 X3t2hxBGxND/yW+xrZD+3viF2Zc= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n15.prod.us-east-1.postgun.com with SMTP id 5f1566fd03c8596cdb7b4427 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 20 Jul 2020 09:42:21 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 133B0C43395; Mon, 20 Jul 2020 09:42:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id 75FF2C433C6; Mon, 20 Jul 2020 09:42:19 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 20 Jul 2020 15:12:19 +0530 From: Sai Prakash Ranjan To: Akash Asthana Cc: bjorn.andersson@linaro.org, mka@chromium.org, linux-kernel@vger.kernel.org, saipraka@codeaurora.org, msavaliy@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH V2] soc: qcom: geni: Fix NULL pointer dereference In-Reply-To: <1595237762-6776-1-git-send-email-akashast@codeaurora.org> References: <1595237762-6776-1-git-send-email-akashast@codeaurora.org> Message-ID: X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-07-20 15:06, Akash Asthana wrote: > pdev struct doesn't exists for the devices whose status are disabled > from DT node, in such cases NULL is returned from > 'of_find_device_by_node' > Later when we try to get drvdata from pdev struct NULL pointer > dereference > is triggered. > > Add a NULL check for return values to fix the issue. > > We were hitting this issue when one of QUP is disabled. > > Fixes: 048eb908a1f2 ("soc: qcom-geni-se: Add interconnect support to > fix earlycon crash") > Reported-by: Sai Prakash Ranjan > Reviewed-by: Matthias Kaehlcke > Signed-off-by: Akash Asthana Nit: my codeaurora mail address is . I don't think you have to resend for this small change, hopefully maintainers are ok to fix this when applying. Reported-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan -Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation