Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3455338pxb; Fri, 5 Nov 2021 16:10:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytgLDrHi+5weSrMGV6EM1+70rvVPK6BJCj721tOIlh9ULiDhEv6apy86E0bYbjxQc9DSaF X-Received: by 2002:a05:6402:d59:: with SMTP id ec25mr58617240edb.214.1636153850045; Fri, 05 Nov 2021 16:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636153850; cv=none; d=google.com; s=arc-20160816; b=nHFxPC4Pjr23INrOJCOAlTTc3X9DGTaUnTgfDffl/SrceDw8l3yKhJpArWHG7QLv2c L0xym6GRRzt9JQqtgZzK9QYR2WhCPX5LMBnHPxuXQtd7khzBKrkxgJsY2RCHHOpLGFtY VNe/KPE9Kq+n0b4RuTk6hoj9hN1BB5lJIhrjJw8Fi/s03ntNRfzArFqJ1cip+n0JyYtE YIP0AGJDvySx9T98/Vo6HrpI0lhP4Z7uFbXbnGVokuXTwIo+mkNCdmXRb3tEDUIJxOJ/ GaJneKRWoGCxx32tpM8TORdA7Iubygn4T23CPcXGbx5aBdMGCLEwQ87PjsgjR5lx/h7q zxrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=4rh6XC/kTiVF2xsn37ZjBf32rxNh34P9YKlCdAoEzjc=; b=bSGnDEA0KCN15B+CwEfo8SreW0ATQFMYrRiMIHVB3bwDzFWhhLefRAl39UixeVjzIN mXsjjCUVAhqN0omifBR/Hq8Ee+ic2WkA1q8JnBuX+h3wVGvaGu1Wwej0i652X7LTPGZ1 BnczKCDE6r/Rgvj8oQ5vknLWwls+M/jhYPd3uCd+AeSOC/60e2S52GB8XjxC1pBUudQO Y1L+5lmU3juLkDPGhAPwenYNN7+5CejKUGFVqzwlk6OBxwS+ozTriI0ybPZQdqnF0rRU 5AEXy0OCxd02IzcpxF3l6u1PA68FaOVMWXqxD/RNgyQtZyid1Hcy/CMBLwkgdU5BwClD x+9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=aEf0SoLT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si16314852ejw.584.2021.11.05.16.10.25; Fri, 05 Nov 2021 16:10:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=aEf0SoLT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233079AbhKEUIu (ORCPT + 99 others); Fri, 5 Nov 2021 16:08:50 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:19492 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbhKEUIt (ORCPT ); Fri, 5 Nov 2021 16:08:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1636142770; x=1667678770; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=4rh6XC/kTiVF2xsn37ZjBf32rxNh34P9YKlCdAoEzjc=; b=aEf0SoLT4UWVgDLacOTawHqgfqr6kDwx/nLqsbWJw6e6QuSl2uGwFioP Yme0eNmXYZlQXQrSdhMaATchChGqEKFM4vnxd6no0tBq05d3Bqz9mlee8 hv1ABeX5ljt9jBnUUaUuoncoFqugFHSD8y7z+reZO3SLkj+shL27ltuOt k=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 05 Nov 2021 13:06:09 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2021 13:06:09 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Fri, 5 Nov 2021 13:06:08 -0700 Received: from [10.47.233.232] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Fri, 5 Nov 2021 13:06:08 -0700 Subject: Re: [RESEND PATCH v2] thermal: Fix a NULL pointer dereference To: Greg KH CC: "Rafael J . Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Nick Desaulniers , , , David Collins , Manaf Meethalavalappu Pallikunhi , References: <1636070227-15909-1-git-send-email-quic_subbaram@quicinc.com> From: Subbaraman Narayanamurthy Message-ID: <22447c4b-7fbe-ab19-d1c4-d7c21a562ab2@quicinc.com> Date: Fri, 5 Nov 2021 13:06:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/4/21 11:50 PM, Greg KH wrote: > On Thu, Nov 04, 2021 at 04:57:07PM -0700, Subbaraman Narayanamurthy wrote: >> of_parse_thermal_zones() parses the thermal-zones node and registers a >> thermal_zone device for each subnode. However, if a thermal zone is >> consuming a thermal sensor and that thermal sensor device hasn't probed >> yet, an attempt to set trip_point_*_temp for that thermal zone device >> can cause a NULL pointer dereference. Fix it. >> >> console:/sys/class/thermal/thermal_zone87 # echo 120000 > trip_point_0_temp >> ... >> Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 >> ... >> Call trace: >> of_thermal_set_trip_temp+0x40/0xc4 >> trip_point_temp_store+0xc0/0x1dc >> dev_attr_store+0x38/0x88 >> sysfs_kf_write+0x64/0xc0 >> kernfs_fop_write_iter+0x108/0x1d0 >> vfs_write+0x2f4/0x368 >> ksys_write+0x7c/0xec >> __arm64_sys_write+0x20/0x30 >> el0_svc_common.llvm.7279915941325364641+0xbc/0x1bc >> do_el0_svc+0x28/0xa0 >> el0_svc+0x14/0x24 >> el0_sync_handler+0x88/0xec >> el0_sync+0x1c0/0x200 >> >> While at it, fix the possible NULL pointer dereference in other >> functions as well: of_thermal_get_temp(), of_thermal_set_emul_temp(), >> of_thermal_get_trend(). >> >> Suggested-by: David Collins >> Signed-off-by: Subbaraman Narayanamurthy >> --- >> drivers/thermal/thermal_of.c | 9 ++++++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) >> > > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > for how to do this properly. > > Hi Greg, For this case, is it because I've missed adding "Cc:stable@vger.kernel.org" in commit text itself and cc-ed stable@vger.kernel.org directly? Thanks, Subbaraman