Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp150824lqp; Fri, 12 Apr 2024 13:16:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWq01RB5BGwh4f2l/6JMblS9nInvoYqH2yy3QwyreVPCQg+Cs+HODDOIFzDnjGj8uj/zWF/+eYaxom+agAjcWt86LL5QIRQFLvsYwh0ZQ== X-Google-Smtp-Source: AGHT+IHU2xMey0Cce9yvvh5o58SwlpgKZZ3AmkoSk2ShxxBpHlxyHrb2fAWxE8c8vnUkgW+lhhw7 X-Received: by 2002:a05:620a:8122:b0:78e:c8d4:5d21 with SMTP id os34-20020a05620a812200b0078ec8d45d21mr3487445qkn.56.1712952961621; Fri, 12 Apr 2024 13:16:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712952961; cv=pass; d=google.com; s=arc-20160816; b=jjrA2VLwB+h5IiUSgK93gSWyRZCfiRIh4390ZTeuQ7V7Iu49JTE8FFfe8HRTTQw5Zh Z97Ac7ZKhc6lCxxRKj3sqltYpGcJ1WW+xhXmdAxk89v7gWiW0HHNAh55a+spk+sALTjv CvLb9SaHOnHve4FNkj6DJ17Kjipy9XfYt4V+GSkZMYkRDDDHrvfi+HLOtyLqHwzfheDE TjtXWc3/jysyoq6f3SbHWM3NvZFjXDOsm0ZUkH5C5uuhI5Mb4KSsv9B1c6AwCgLadJzn RTo/7XspBzau8RtHr//+q2fCRXEozyXJXZ0jV6YiEBUmOCefql7qWu8EgcT91TIcjI+R hApQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=AZGnnSq5y2YjviTAKNxk/PkgHCUA3kk34GMmkI9ABc8=; fh=XHNZD56Z1oBbIEOM6NrDZ+8+LlpGu6BNxlPqgc1X95Q=; b=zHD9osF+tq/yLsyhxg2UJjTf0vmlhoZIAgfbmh3CzQFbmvkByetecvxUBctk4Y33df kpSqhg7xr1kp2R0aOAkkf3YOmHb29EXXqimegnbvHFttUqjQrULS3c2rcGjhLukUfZk1 02WkqGN9UQESJwdXZ2KQHIuhY2HrjGGXzZMfdQ+haTca5UYcPO8zJZK2lif7ssDDQ81x jLlJfeOzz8F3foySnDF06qIOvgLgMGQzF5ikIaRPqDaAX19aAlFvzsDycJaXt42YxkE7 YeFy75uGeqNvUlX/3/ITTyQ9eWdT7yOCLfFoIQsVz8o9WxqH3sBp8k4WWj2/Shk+J5DD yvdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xxUqjrxy; 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-143289-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v27-20020a05620a123b00b0078ed383ce7bsi948602qkj.58.2024.04.12.13.16.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 13:16:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143289-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xxUqjrxy; 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-143289-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143289-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2FC781C21B61 for ; Fri, 12 Apr 2024 20:16:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED3E31514C7; Fri, 12 Apr 2024 20:15:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xxUqjrxy" Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.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 273C614A091 for ; Fri, 12 Apr 2024 20:15:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712952953; cv=none; b=DzoQBb/e8kkRkOrXunDJVtX1p9ugdXLxeH2/dt6ks24JxwKnnCmH/FQvVGG4Ybt+58CwUfG8aVdE9KUiz5o+4hNxNi9nvyCG6GupWkiINeRLk2PeI7ELYYvzgvR0fn28DdkCoc8w9TOtP95muxF9oDTzQkVV5qAzG8ZKW0j0r5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712952953; c=relaxed/simple; bh=I8mYRiMTwYIuYH0sx3PH+V1h5Zoz0qzEcn9x/5NP0Rs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fW28YIs6a9aPlUCE8/ZjSOH56FPmwYt63fBvXAgaKaGvuCp71wnEwb5y2NJbgzaCE6xLiHD0Pech/ATwp6dWrfrVFV7QIUM653jJ12RLtp8ANody5X13BJX4mIgTVT7O6ENJsla3IzAT0EiTy3MPMG6ATTGeZqh6Kkd3+ZcTvOA= 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=xxUqjrxy; arc=none smtp.client-ip=209.85.208.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-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-56e477db7fbso1915884a12.3 for ; Fri, 12 Apr 2024 13:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712952948; x=1713557748; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=AZGnnSq5y2YjviTAKNxk/PkgHCUA3kk34GMmkI9ABc8=; b=xxUqjrxy3Amgnq1uxdLiIOVIr6Do5arNNWv3DtnxMYvTOIawAoO/2P5yh1qCUmme6L knxoOc7gv4Mo6kSsCzdmll064XZ4ncfyMSwWtI23giPhVZH7XQl7dOTGg0b7CHezXHRU mybiu3qy49na63FcMmGe4fdGwvRQYn25fmXlPnCGICgg4cJMmqkVM81MQMTXa5S8CXdW 5cDiLBakhzsLwJbcKIIVtWQNF1hJ1yqCgeusmcpJ4va9J45jCw61OUNM4SWeeMD37txb h4wDgAoEuZQmMaXAA/qQ1UiYxp1TySD7CfUJHK0uX+TMe1IcHEQte2w0Fh3TSJcK6uWW beMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712952948; x=1713557748; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AZGnnSq5y2YjviTAKNxk/PkgHCUA3kk34GMmkI9ABc8=; b=EB5DO3v3chumr/frOse0e0cauDl0U2CcXDWRchMwYq7qfym8UTXSX16yJ8o5/RmsSQ jerk5ZmGJtMnXS7WvmZngbtCTWmAAWHjR8Z6iK6WZMUMLSa4gA0TXzp+XAZNTspVJDcM NA5DJlYywCXVUn9mPoIW5h/+rgrvnpo/7dA9XD2zfDp64KC6T3DWvVFZK3k+79rUKqSx sJFh2yyzYCgFAlXkJ7WpiBimt7kbH43LD7kpmhjfEpaX49bm54Ol1mx3yPnpCzHxUT5w xQT9/osMAvesZqJsJ+fO36DMMfcgjIwEioOcD5v1KSUuGsH9Fs6LlBGL82k5gALL6Mii ufZQ== X-Forwarded-Encrypted: i=1; AJvYcCXMemZXrULNLj+ZSu9fAxysi1zaf1Zs2K3QRtNctxP4KQHS+ksFSkTjIZnSp7SPIglRKiemR1TZHquQx15fyz1yl9QjRcQMs23QBW/q X-Gm-Message-State: AOJu0Yw11i78UNBF9A5Ga+wzBa+9Gw5HSd/J8ssiNwl1PS00yZ81OCSE Op9ZK9aJYMkAI7MAaGVzBYTyO9yyF5EfSOYrLny2v+XxJvmkb3c8Z+AnqBZar+I= X-Received: by 2002:a17:906:fb87:b0:a52:408f:8575 with SMTP id lr7-20020a170906fb8700b00a52408f8575mr857891ejb.12.1712952948336; Fri, 12 Apr 2024 13:15:48 -0700 (PDT) Received: from [192.168.45.55] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id dm3-20020a170907948300b00a523b03a1edsm876114ejc.20.2024.04.12.13.15.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Apr 2024 13:15:47 -0700 (PDT) Message-ID: Date: Fri, 12 Apr 2024 22:15:45 +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 To: Aleksandr Mishin , Christian Marangi Cc: Amit Kucheria , Thara Gopinath , Bjorn Andersson , "Rafael J. Wysocki" , Daniel Lezcano , 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> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt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tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20240411114021.12203-1-amishin@t-argos.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11.04.2024 1:40 PM, 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 > --- Reviewed-by: Konrad Dybcio Konrad