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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 C18B7C433E0 for ; Thu, 25 Jun 2020 12:58:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 8E9442063A for ; Thu, 25 Jun 2020 12:58:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rw36vHna"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="QJTtzwmw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E9442063A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.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=s6ko3AYP18eUI5ErWokM82/dmn2mYRWur3bXKCDiuvw=; b=rw36vHnaLWJYPA1a+wdW3T0N9 mjShA5kBPuyTjH6gR1m0/HdP+Fffmz+wEqeWx46mCFaS2vQ0V8dSHvFEbi9WOp//BbHPpE7GaOb4G T2+WUkU4sHxDU21EDL8krjpiAh4oB9BXiOUDQSCfAqCqGMX5qpkdB0bLiiBxyX9maaFJf3G5YCqbq 6FSiQDygaGUzQVOYLQt44T1QD4IN/gB/QG8cyIUkDhuDu3XBHQ2HsWNKbirRgbcAi0o3oImjvyCFk Abpd7Dcjo9as3+m9sjt7ImCwNrISir5yYR9UU3Gv6CBJn4EjJkdhi8cULf2/u3Sjux3x9Bq7LxqI3 e0sFVVfQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRR9-00024K-HU; Thu, 25 Jun 2020 12:57:03 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRR6-00023e-J4 for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 12:57:01 +0000 Received: from localhost (unknown [171.61.66.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 057D12063A; Thu, 25 Jun 2020 12:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593089819; bh=kzaLKrREKLzRea6TUdWAoSQVtDNNj/8G/ZUDOabAD2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QJTtzwmwzWA2xKg8Z9TmfLY1vrj+do4O1oqiphD8lH5tUaCRftHhIB1DW5uZkgTVW QSGQMj+jJ2qKJZmBRB/L5QenTsKIDOLBGM7zFyLcL7ShSxbGIn673QHc04vZYebROp W6vxWtumIHBBRMLmNiKzQviCgSYoHz47THh8HGrk= Date: Thu, 25 Jun 2020 18:26:55 +0530 From: Vinod Koul To: Colin King Subject: Re: [PATCH] phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked Message-ID: <20200625125655.GC6228@vkoul-mobl> References: <20200625124428.83564-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200625124428.83564-1-colin.king@canonical.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Kishon Vijay Abraham I , Paul Kocialkowski , Chen-Yu Tsai , Maxime Ripard , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 25-06-20, 13:44, Colin King wrote: > From: Colin Ian King > > Currently pointer phy0 is being dereferenced via the assignment of > phy on the call to phy_get_drvdata before phy0 is null checked, this > can lead to a null pointer dereference. Fix this by performing the > null check on phy0 before the call to phy_get_drvdata. Also replace > the phy0 == NULL check with the more usual !phy0 idiom. Applied, thanks -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel