Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2389635lqt; Mon, 22 Apr 2024 09:20:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU54mcr4Iyktqq4SaXnGNYdSmNiqQNaRVm2KR3f2oB+GZqeEVO9S/eF47djVX9P0yTuhK6ga+JigpDoJ1hFdX/MrhTk7us4QRW9B0WPDA== X-Google-Smtp-Source: AGHT+IH/MGHxSOYAZYA3+qecHz/fgMXR2Aa6H/UXXuIm1E2DqLndu8K9qVhcljjuh43NsXil+SP1 X-Received: by 2002:a17:90b:350c:b0:2ac:a3ca:3097 with SMTP id ls12-20020a17090b350c00b002aca3ca3097mr222230pjb.0.1713802855918; Mon, 22 Apr 2024 09:20:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713802855; cv=pass; d=google.com; s=arc-20160816; b=hH9HQ9ydtaIq+RGczAN2q9cFGHI/68Mb+IvdHRmv9ey4kkOhf1vJAlhwjSPvBSmug0 5ZWi96ZhJyDYeT+tllciylfwt5EEF+SdD4aTpSdJ+tkPV9qvFl2ZCt7qVm+/SvvCDiwp sxKiRWHv6j3rZ8/2rCaXPm4cj1vgzOrf4eT+lhrOGe3tb47xtsp0nAs/5pFZDq7UNbXC I5S2YBWeASEwG4jgrfN1pLOGQZARvSW/XGIeacoWZvdgbfRv/wYeYY8Ki8/T68JAjKGf 7Ys1n/d13pTlsxTIiqc3VKuLounagr2ZIjHsCFc7sBDNu6aetSVIri2q626zpsrqjj88 vZUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=X18imHTv2CCCHmqGW/+6bF3p/ote05AGlg/ZRuYja/w=; fh=o0LlKbdyc//skFme8ZxtOeAdLgB/nC5JcIVIo9txQ6A=; b=bZuvDg6nCyC+iC7mUnWupHXmVOjMSeUea+j0hnuB4P2XKRQxEVkOFeHUCH0BDJw0u4 tLspzzquYpNZyifwq/Y4kRKvjqRhSVa4Cd+lXxljE505R6WiRM2ZDKl6X6c5fxX/XBga S29lfV3AOIHjYFc3QJPAoE/jKAYGx/dYgKTn+DzdlksFcrvcc69MsHI8G2ZeXAHzbqbx oiZkvzt4pPOxMUFt27Y5orP/WkF3UXCriLHTvcRcmRUFAVbJiPXEXHL1NUQb5dWap4Qm aKXsza4YS0nbjGoUT1oc0YVv6LXTXx4eOiP/AEFo3MEXP9pkq6OctmX6hEXwiH5kF2NO X/og==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qMxp9/Cb"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-153693-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p6-20020a17090a428600b002ade41dafb8si1876749pjg.125.2024.04.22.09.20.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 09:20:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153693-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qMxp9/Cb"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-153693-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 452882814D7 for ; Mon, 22 Apr 2024 16:20:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74901153814; Mon, 22 Apr 2024 16:20:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qMxp9/Cb" Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 0D9BE153588 for ; Mon, 22 Apr 2024 16:20:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713802843; cv=none; b=lTk05yF6SIDq7Ea2ItYpEDDhmMiKR+C+YyZbgzNPZyzEuewPyB+y6losv1pBNyerfZ5KW3dfLWcvESmGWkF8ESJLZ6hAnbycbKGhFM/yMShiBrEfzvPlrAPB4Kwrg870h+DSM4rYcO+JqUfJdYbki7gicl9a/q7D+heg3E8Owyk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713802843; c=relaxed/simple; bh=1RVmdqoNjPvhMddsjlY+Xa3pKKSVN/+WNm0VO+799Qw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tn/g2ipEd9sybhqIDsnPhFYOIreujv/eQwWUUllkl8l9FE21N4tObIObvoPP1jxsm258eLnvIF2fAqWlYbuXJG2UC6/o7do8MdypJpEzOapsfbKAhyBOSwOlA18Ck3Iypw6/P6huWyV9WsJpCwuldb9HpBRHIVIbjCfWGuHTHWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qMxp9/Cb; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-41a55be31dfso8651635e9.0 for ; Mon, 22 Apr 2024 09:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713802840; x=1714407640; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=X18imHTv2CCCHmqGW/+6bF3p/ote05AGlg/ZRuYja/w=; b=qMxp9/CbAifSXDricfddLb4xc+2kKW/TS88uxuopIwdRY4SrCJtDkP9Y8H25LXKW+x yw2y/BF29LAFcxC19zM+Yl4dgV10e9dr7qRJBsnBEL9l9o/nMjMzcZix1wE497VJklTY LEnObtGe5xxxGZDXBDvfi3Sa3QPwSylJ2719zDv3nkYlVBGGakuv/q+Os5nMNlVUeb3n jZZsxnB5SocaCSedfDFmcMwUT1E7xE69mhhuCTMEdngmbrQ/6XdYFI5xf+UmprWtKbdc yi/sdBTBvVE9vvgTlNHd8t0fDYoJErPAh/zOsyK48WPrcn9WCrfFE/KqXC6+HawJ0Vim xGfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713802840; x=1714407640; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X18imHTv2CCCHmqGW/+6bF3p/ote05AGlg/ZRuYja/w=; b=q9r/PARgNFiMUlL/K/kSRiY/5WpjL7V+CE+re4mWy8942YQZpT4pDP5DnbgRcRqlTH 0QccCxqaiKMsU2JtqQFGJL6xcmngeheKnCJmQJqigD7lgqmKrStawYheNBIIqHJLfXzy NyZCTne635n8ZS/Poygx9lGgdkJ78fKnKoNbY2hgvDYTuuS+pQCQSCIJULRXT+D57lRm izHAeEHzkLUdqyP3R8k0W49dfUGdEDJNVKfTpD3YPVPLIfsKndD10uYX6cvs8ynJC2p6 U8jWlOMNSkWLlFmWEIVF3BRvAHa+fnr1eCH12+X2Db/EQXCnRc/c3Wz/j+LCY6GkN3oa 3BjQ== X-Forwarded-Encrypted: i=1; AJvYcCWMmrl7b2ZuFR4WgJayWPTQxB7cAZwzuxWPIT7br4kp1zEOMOcYta/CJ3cExD38aOkAMpkvTZa2ZE/1/Wo9Y/qtGZAPgPsn3Yq44/YJ X-Gm-Message-State: AOJu0Yx+dy1pZArpmzoyL+YZesTxhxa/57/g4wUGKFd2dP6Ql2hpqBYO R6D3PiC3oBp5Vztgbp0nXMtpQAc+hdgplraWqHbKo6bb0nPsBS9ECh266Erv0dOhN4bhcmRKXwq 2 X-Received: by 2002:a05:600c:3d8f:b0:41a:9cb2:752e with SMTP id bi15-20020a05600c3d8f00b0041a9cb2752emr527200wmb.27.1713802840285; Mon, 22 Apr 2024 09:20:40 -0700 (PDT) Received: from [192.168.10.46] (146725694.box.freepro.com. [130.180.211.218]) by smtp.googlemail.com with ESMTPSA id hg12-20020a05600c538c00b00415dfa709dasm17032958wmb.15.2024.04.22.09.20.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Apr 2024 09:20:39 -0700 (PDT) Message-ID: Date: Mon, 22 Apr 2024 18:20:38 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] drivers: thermal: tsens: Fix null pointer dereference Content-Language: en-US To: Aleksandr Mishin , Christian Marangi Cc: Amit Kucheria , Thara Gopinath , Bjorn Andersson , Konrad Dybcio , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20240411114021.12203-1-amishin@t-argos.ru> From: Daniel Lezcano In-Reply-To: <20240411114021.12203-1-amishin@t-argos.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/04/2024 13:40, Aleksandr Mishin wrote: > compute_intercept_slope() is called from calibrate_8960() (in tsens-8960.c) > as compute_intercept_slope(priv, p1, NULL, ONE_PT_CALIB) which lead to null > pointer dereference (if DEBUG or DYNAMIC_DEBUG set). > Fix this bug by adding null pointer check. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: dfc1193d4dbd ("thermal/drivers/tsens: Replace custom 8960 apis with generic apis") > Signed-off-by: Aleksandr Mishin > --- Applied, thanks -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog