From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3242C7EE45 for ; Mon, 12 Jun 2023 10:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235883AbjFLKxQ (ORCPT ); Mon, 12 Jun 2023 06:53:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235906AbjFLKwv (ORCPT ); Mon, 12 Jun 2023 06:52:51 -0400 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18EAEA5D0 for ; Mon, 12 Jun 2023 03:37:27 -0700 (PDT) Received: from localhost (88-113-24-87.elisa-laajakaista.fi [88.113.24.87]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id 179fbd2c-090a-11ee-abf4-005056bdd08f; Mon, 12 Jun 2023 13:15:45 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Mon, 12 Jun 2023 13:15:44 +0300 To: Markus Burri Cc: linux-kernel@vger.kernel.org, Lars-Peter Clausen , Michael Hennerich , Alexandru Tachici , Jonathan Cameron , linux-iio@vger.kernel.org Subject: Re: [PATCH v1] iio: adc: ad7192: store indio_dev into spi driver data Message-ID: References: <20230612080847.39170-1-markus.burri@mt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230612080847.39170-1-markus.burri@mt.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Jun 12, 2023 at 10:08:47AM +0200, Markus Burri kirjoitti: > After calibration the indio_dev is used to get channel information. > Since the pointer is not stored into spi driver data, there is a kernel > null pointer dereference. > Store the indio_dev into spi driver data to fix this. This definitely deserves the Fixes tag. Can you dig the history to find the culprit one? > Add error check and slightly extend the debug messages. I'm not sure this will belong to the same change, so I would split this out to a separate one. -- With Best Regards, Andy Shevchenko