From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 842293F929A for ; Mon, 17 Aug 2026 11:13:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786965235; cv=none; b=us75zKH9LHJBx2oVZtiB7KQqhjkulXXdV4ZXA3ouX5gt9ut8VYFY/BlY2/0i+8Rfg+fUL9ABJ9IstQLCTSisRtkkNmdu/pFqbkf2joI0Ms3QyPv4t+wXzMCzEStNM/3AaU8p66+/STRf9DGgTMDpcdM5mKtg32fnUgKRt3EoOoM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786965235; c=relaxed/simple; bh=yP5Z0Zw9/7oyNxvKw0EGDkO5COXnnpYOwO9TLA5kajc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ABX9apz0im8Bz0nSs+M6j5aFdud0ZKc1SYkzC3VkwSBZo71KpVApc8R9Y7LBQOqFE1DnNQgaH+kKRtMhDmrOkHq5BTHEY0vNRwtMHBXJBFrn9USluPcb0oWIw31XCyRQ3XvnbiN5jM3sFmxYPSHbtunItpEdyDpIIYDk2DnvTEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gI/Y1qcc; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gI/Y1qcc" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-4815bce4652so2012912f8f.1 for ; Mon, 17 Aug 2026 04:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786965233; x=1787570033; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=hCAG987424i5Op1rCNWT0rT5ZiBWCiG0rVbJNv0+R6s=; b=gI/Y1qcc3n+3rRwDsdh0X1yPdlpux6pSdx86dKdRaNl3muQ/J4rCPYzBLmOSK7sfIX ixnLFxu4Tpl+ZKFXqSJZc4bpJ6if0XGXUuyr+TPLGH8Z3mbXGnMcCOYRyk3XGxjO3dIJ kD5NDwtFA9yoAjg1FSpKntmX3G0I3E7s7TqYwQ/5F9AQrqr3/f943qByszPwj+McKVlp SMcv154Yxng6qNu8him7naLaf3M0CHo4D7l+Tw6ldjwy/BjKb4K6vvjHTqvdI7e+m3xx YQvnFJud9yj7vIiNp3FiHDoj7XxxACSe3Bb2lk6AtPd4eKSregjP6kW2aUZ/+OJdL5eg SKeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786965233; x=1787570033; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=hCAG987424i5Op1rCNWT0rT5ZiBWCiG0rVbJNv0+R6s=; b=Wf6gta21Oh9EA6K+Xd2sdi+bSYQSmyO8/inEhzgdkZq/TT1p8YPye7bi/8SokFJaNt xYbSel29KKVotZlb9gxSC9zE9R9I3x8uymXR9gkQFqnm3i0oSMafvQFwBbbcds4gxHi8 zDJ4Um4WgWLOEbOIAHrF1Uex+FzjmxDVdRmTGsQi/WkbZD8UehAaavkCzcRWPHZpZ2WY USMZE44Df2snI38zpbl/jc6VQW+X/k2OSmUvpMmprpFrNzNicmI/zpJ5JCZSc3QPWdUf eVE4CTCo6dUqw4o4wDO224CD3vw2PBfQwHEJ93V82fOkrLuTekT29d4PjHM0zwSpLjiJ htPw== X-Forwarded-Encrypted: i=1; AHgh+RrYWeFa7rQ7RzstXjFbH7u/m0z5Fgthmj8L/3V87KpxcSn5QRCQbXVpUULmJvO0UksnfjHR5nCEQ9wltqw=@vger.kernel.org X-Gm-Message-State: AOJu0YyDD88fA0MG/9xD5xhlhsA2spCCDhfoZNEnHTM7jYj1p7lg7W2y 5oA2tnoLngtvepa7fW4Whehzd50KJC9CEY2HUJnyIrMGw3eRoAEakn/K X-Gm-Gg: AR+sD11gqW5Vyd2sOGYK77NeN4vdA7R9rVWbUYbjX3uRbRhsHPP2KqEF/YFKlfnpNRu Y7tTBG++jimlUYtlLx862GUTU/YTkTaagYFXjckpdy+2Gch+iYmZZkyIX+4NMlYrCH1chLs2w9d p/gPbxaoQN/9lRRfLfj5Rw+CUzB7ndBFXHnTY3D88qlJzTOm3pJkvAeFLZ1OAI2aRTk7q9yrXEj I0JLraDy1nqNKG0bwVEACVG6g0ZlDRvnhNJd9GayIhfcrIlcovzsQyH1OJTlZKdP8MozWpznhiD rnr6RCzMG+8lw0IyjtcFi9XqD24VuyssWgOemCZYfC2Us/iUxHHiQtmo5T+Juz7jIG/tqK4zYwL kXwUgcy7pusaPwCt70YT7yoytOB94mNb+m1NRQot4m2GPppd8GEwTFoBCTR0UHxAooxULLwAC7U UAJBbaYdNW9Vt33zTS5oz62udtmwRQELMd2hULS+1n3TckoZt67URqYKB3BzbPZ4pInb2A X-Received: by 2002:a5d:5449:0:b0:47f:5369:bba with SMTP id ffacd0b85a97d-48160782d05mr34547608f8f.15.1786965232687; Mon, 17 Aug 2026 04:13:52 -0700 (PDT) Received: from localhost ([2c0f:3d00:6be:8900:9cf4:43df:e612:817b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482a5a315bfsm3270339f8f.1.2026.08.17.04.13.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 04:13:52 -0700 (PDT) Date: Mon, 17 Aug 2026 14:13:37 +0300 From: Dan Carpenter To: Yuhao Jiang Cc: moonafterrain@outlook.com, Sudip Mukherjee , Teddy Wang , Greg Kroah-Hartman , linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] staging: sm750fb: do not program the PLL from an uninitialized value Message-ID: References: <20260817-sm750-fixes-v1-1-978c617e5a20@outlook.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Aug 17, 2026 at 05:49:33AM -0500, Yuhao Jiang wrote: > On Mon, Aug 17, 2026 at 4:59 AM Dan Carpenter wrote: > > > > On Mon, Aug 17, 2026 at 05:13:53PM +0800, Junrui Luo via B4 Relay wrote: > > > From: Junrui Luo > > > > > > sm750_calc_pll_value() writes pll->M, N, OD and POD only when its search > > > loop finds a divider combination with 0 < M < 256, and returns 0 when > > > there is none. ddk750_set_mode_timing() discards that return value and > > > calls program_mode_registers() regardless, so sm750_format_pll_reg() > > > reads the four members uninitialized and pokes them into PANEL_PLL_CTRL > > > or CRT_PLL_CTRL. Nothing bounds var->pixclock on the way in, so a mode > > > set can ask for a clock the loop cannot represent. > > > > > > Consume the return value and reject the mode; hw_sm750_crtc_set_mode() > > > already propagates a non-zero return. Initialize the structure as well: > > > sm750_calc_pll_value() returns early for SM750LE without writing the > > > members, and returns non-zero on that path. > > > > > > Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging") > > > Reported-by: Yuhao Jiang > > > Assisted-by: Claude:claude-opus-5 > > > Cc: stable@vger.kernel.org > > > Signed-off-by: Junrui Luo > > > --- > > > > Greg is not taking AI patches unless they can be tested. > > https://lore.kernel.org/all/2026080354-skater-urgent-31b2@gregkh/ > > > > I kind of hate AI commit messages... They are so verbose, confident > > and reasonable sounding. But they don't answer any of the real > > questions I want to know. How did Yuhao Jiang find this bug? What > > We're working on an LLM-assisted system for vulnerability discovery, > and this bug was found by the system and checked by me. > I feel like this is always part of the story and should be told. Regardless the firm rule is that everyone agrees on if you can't test it, then that needs to be in the notes under the --- cut off. (I sometimes skip this, but I've been doing this for a long long time and everyone knows who I am. I should follow the rules too. #shame). regards, dan carpenter