Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2841734imb; Mon, 4 Mar 2019 16:00:27 -0800 (PST) X-Google-Smtp-Source: APXvYqygGUC+LWlIOYR+G+NYCFWRnpf83etyyDEoh9MJYCV9821g2+C+a90Gn37heMxYB25AeWhS X-Received: by 2002:a63:1f06:: with SMTP id f6mr21098055pgf.385.1551744027617; Mon, 04 Mar 2019 16:00:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551744027; cv=none; d=google.com; s=arc-20160816; b=CllHck58UT7ldzJ8ZWIuElCIY9FcaAELSxXdmEReK4ytOKun1tHkNNIkUnImPjsClj kL207h0VM8NsCky/ZKfAWdC0V8yuOfB637kYpnbMj0wsFzuQ4sEeABKaMXC9Ufvzhaj5 ZTnNw7LHs+JXEPT4TzkDE5apGeRD6JObec4wXOGOAm3PASIbLUqPE53YDl4MmNYA3wsf l9JW3s4pJTCaIuFVdfSc+2xxEzKWnp3dHOTYQ3qJk+8faIvuwOX0UxmsSGbKfIqzAtHJ qGXDmBJHc3WL5tnnPgOUCB9BORFb5xwjAmBvJfxVpn+zTx6/28ilEwVLiW49JZGN3a3f kQgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:user-agent :references:in-reply-to:subject:to:from; bh=qTM5YPo/A++0F7yM3xoVn/Mb57UKYIWeCwkmiRebdZY=; b=Frdk3LcgWgu++mM9e0pxt3/87Jdm8D9Tedy/f6QIlUYcskF3BuDb77IBAkVZDNBeuw KVgvaddYjkYstgJM4uodqWrUUttcYUtfwWcjYcRqmlDoeuX1ul8XqT4PAZM4BZtXOBsC kfirjxYCOtjVXosRsvCHp7QwtI3VDzCcaz+nK6q2drq7Nb9+UV48+0Q6z3j19dnjWYKd UvdFSxlkiITthyLDhlBRXTfeufZCArH3Wad3UIX6YoTjtHzrPR1C1J1OJ4kCT5YT6eJq Nv/nXRaMt+qpp/wv26Vaeuf2jG/5HZzQOx5q/NbT17FYsSxC1CS6YKpjE1KdAPq8k7j2 l9AA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si6175464pgr.149.2019.03.04.16.00.11; Mon, 04 Mar 2019 16:00:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726781AbfCDX6e (ORCPT + 99 others); Mon, 4 Mar 2019 18:58:34 -0500 Received: from anholt.net ([50.246.234.109]:56850 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbfCDX6e (ORCPT ); Mon, 4 Mar 2019 18:58:34 -0500 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 9F85010A2DEE; Mon, 4 Mar 2019 15:58:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zj-Pw2x8csgH; Mon, 4 Mar 2019 15:58:32 -0800 (PST) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 54D2F10A2DD8; Mon, 4 Mar 2019 15:58:32 -0800 (PST) Received: by eliezer.anholt.net (Postfix, from userid 1000) id BDF4C2FE464E; Mon, 4 Mar 2019 15:58:31 -0800 (PST) From: Eric Anholt To: Phil Elwell , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Stefan Wahren , Geert Uytterhoeven , Phil Elwell , linux-pm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH resend] thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs In-Reply-To: <1548755757-79270-1-git-send-email-phil@raspberrypi.org> References: <1548755757-79270-1-git-send-email-phil@raspberrypi.org> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Mon, 04 Mar 2019 15:58:31 -0800 Message-ID: <8736o2qjiw.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Phil Elwell writes: > "cat /sys/kernel/debug/bcm2835_thermal/regset" causes a NULL pointer > dereference in bcm2835_thermal_debugfs. The driver makes use of the > implementation details of the thermal framework to retrieve a pointer > to its private data from a struct thermal_zone_device, and gets it > wrong - leading to the crash. Instead, store its private data as the > drvdata and retrieve the thermal_zone_device pointer from it. > > Fixes: bcb7dd9ef206 ("thermal: bcm2835: add thermal driver for bcm2835 So= C") > > Signed-off-by: Phil Elwell Acked-by: Eric Anholt From=20the thread that missed Ccing the maintainers there was also: Reviewed-by: Daniel Lezcano --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlx9u6cACgkQtdYpNtH8 nuhpSQ//feRJqNfXmXK1TTSvE4FlARA8oPQVS+whGt9s9uTUiFn9jKwfstx2krTr vEeod0LslKwR6bzPDkdti93SOf7WtGCIYl6olQtfkSMW7JxFPCwpTsZMqWxxde4L 29iiTJiKWsraGTiSQeudfJfARCi69+s0PdVIIQxeoENwOCOXoARcotFvIJNMp+i/ JH5iJLgch5lADC1naf4mz21WQnY6OsfiIgt+tLe0xHzfdLINhSLaQFHQneSvjZE/ EW0zwZ6ZNMa93IUN3lGXDFx5c/9q9CCdC+Gv4bY9oUxu06rOydPwrC5ZXF9VQtap 4uAO9OzQaDitWZNZKhEBlr2fJsFrg1xIRDam/0sTosGiX+V65ZiO6KLCcXR8qbng UuQQnsFCuudL4BioiGNWB+dUZ1UuWOw6SYTfbVwc+bmYZ2E5G+BuObBkQM3nYcVX aY6SKJabbIVZGJQ+0s+zIYm+3qG00u1WFWJcvTUTTaBn3q0DN3O873QZHWMNzKQE VOmCiRobHCq/SQ0oMWBkqHG5isdsrsXJ1X7vIxS3u80ttM7Qupah2x6raneE+A8M GES7uBtz67L4m6juya5GCdglR75vch9J0XwAVgbmh5Uf/KiINy56RYRn1pzgWHw+ Rb3nB02b4u5NUIxBfmS5Qo50Hu644kQXKX/x3Dl8QMUf3XoWJ20= =BorT -----END PGP SIGNATURE----- --=-=-=--