Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2926668lqp; Mon, 25 Mar 2024 13:19:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGOxRJxwo30q/gryTTr457yfsWSQzvqyolD0u4Ya9fplO5B0ig6DoMkyntiw3891bwzXhD53HjhKfDprS3s/GUyoetcs7HiTvckrmSwQ== X-Google-Smtp-Source: AGHT+IEaP0wkq7ccoSCqNkZYB45nc9Ju9UAN3ZLUeDxMuqP2cuyqlpc8Cb91niMrN/90JMixaJ4W X-Received: by 2002:a17:902:e5c7:b0:1e0:9d43:55cb with SMTP id u7-20020a170902e5c700b001e09d4355cbmr10633177plf.34.1711397965295; Mon, 25 Mar 2024 13:19:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711397965; cv=pass; d=google.com; s=arc-20160816; b=XATXEsSJHV4e2Ba70ZIsrO09w0CvxFm62KlHax8hdFbvP0+xFvX4qRJsAVEDXwfQvX lNfhi0q/RJiHFu+pEmDWgt39nrkWUAuWgGVPt5mPM1/IXkTuCPJwaGgDTcqqiEkUr8cC B6A8iWQPWuUxiGo17iHS+MTWTWjW1Yd4i//Tm9CtF59xb8PJh6rTFDJzs71/RiKfN93X jPqpO73P9wyRcaOHR7H5LuUkhBkkLT9j2hAIHoSl1TJca4F+N0bfrCqg0ISRY6TSEilj qxfTnj+wKm4EY5NMMPQ7iMf1ZHip67fqZP/Kd1o8N1P41ItVxBmQa+CtyniE2OwWPHlw kc9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ib7GsXJL2hwjOEEuaNYmsfMXqAJ+kFKKW9Qz5HRmhc8=; fh=8tl656Zwu0/IP1pxT8cnAaC3V0yfhtF8ccWHr4lgjV4=; b=ZZSt8p4hBfgXT6MiNtLMVbvA/tJlDLwoT+rqcBGiuhlNvshH27vN5A3dqWRGYl8BCs n5MMEZTMNTJAufsFbN5LiieYvwT1cZcUsuFy8Lh9BPlwj7dCZcd5aj/5dDTKkncjZVp+ N9hirPOdSvYF4rTGM5RscVGfkS0DGRswwPAxUjsu2XdHWobyinstJyKxWO+7MXawjFj1 xDy+i54YM3D4sv00YQyU7H4ICKKIbP19Yudgo8qrVZBcwAh5F/xih0PNTsr4xg6xLrnB ehCsgqnLkGMFWeXo16PA65ZR24Yi39EBUaVIyhwqNdJzuUe1cOEiJM99i6voHSxriZjH Ur6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="Wr/mJECD"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-117839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y3-20020a170902700300b001def967788esi5728703plk.175.2024.03.25.13.19.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 13:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="Wr/mJECD"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-117839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A040DB2AC70 for ; Mon, 25 Mar 2024 19:42:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1721224FB; Mon, 25 Mar 2024 19:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Wr/mJECD" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3F474E1A2; Mon, 25 Mar 2024 19:41:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711395680; cv=none; b=RbFsdIoWzyW88gPe8qn0nW5DXYRF8DNxfozKASlocRILOjeEVZDEsqBmQMGjiNUDqyvSwYmBPm6hZI6vgBySIbtnvrvhYg4IrOYpLEuZUHyZdfPrgvUwLgToAaIamDxurA3D1cFba9fESL2wVrZGTy1OgMOR6I8qvgddqnTL6t4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711395680; c=relaxed/simple; bh=3xnZx4O3dbcAf+Y7O5EM0rkpFufFse3NgrQVMqIYK90=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LbnYjy5UQt4uiq/kPjv7hRrNSWa6eiWfarefHWWWmIMjJBPWR4Y3GHqbWkaBa9fxQZQi/AqWqwg938xKhNeGFuXjh0nUT7bXpWdJ6g8JBstdE5Ckf5JZagRqu1wLdMOkbeJVXHGd+VyIxu7VVa4+4ynzi38LcabnYRQW9bJ4uCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=Wr/mJECD; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=ib7GsXJL2hwjOEEuaNYmsfMXqAJ+kFKKW9Qz5HRmhc8=; b=Wr/mJECDMriqE1iWmGeyTFQbAo rvKuQ545xY7dKNCtNQmC+5TBM/O8Rbg6xWUY7oypmsUuoQkcOUSohqcz9BIpC7sOPrBQEYOFKH/iU uSWVsiY22Cjk0qNs9mZULIHVy7ox/XRNxYy86SRwBdb7bGMJ8+NzzkVZNZqalfhsF/TI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1roqBf-00BC1C-AC; Mon, 25 Mar 2024 20:40:51 +0100 Date: Mon, 25 Mar 2024 20:40:51 +0100 From: Andrew Lunn To: Christian Marangi Cc: Heiner Kallweit , Russell King , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, William Wortel , stable@vger.kernel.org Subject: Re: [net PATCH] net: phy: qcom: at803x: fix kernel panic with at8031_probe Message-ID: <28af27cd-52a5-443c-86a9-60c0699bc0ef@lunn.ch> References: <20240325190621.2665-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240325190621.2665-1-ansuelsmth@gmail.com> On Mon, Mar 25, 2024 at 08:06:19PM +0100, Christian Marangi wrote: > On reworking and splitting the at803x driver, in splitting function of > at803x PHYs it was added a NULL dereference bug where priv is referenced > before it's actually allocated and then is tried to write to for the > is_1000basex and is_fiber variables in the case of at8031, writing on > the wrong address. > > Fix this by correctly setting priv local variable only after > at803x_probe is called and actually allocates priv in the phydev struct. > > Reported-by: William Wortel > Cc: > Fixes: 25d2ba94005f ("net: phy: at803x: move specific at8031 probe mode check to dedicated probe") > Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Andrew