Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5376302rwd; Mon, 12 Jun 2023 04:22:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4YapKSVbBoSFleF1SgIjHYF3ctGuaqLSwaivRWsHSXq5uBkD+puP5j4/jGXLsqtsxTsuLI X-Received: by 2002:a92:d905:0:b0:340:5160:13c3 with SMTP id s5-20020a92d905000000b00340516013c3mr81695iln.15.1686568958309; Mon, 12 Jun 2023 04:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686568958; cv=none; d=google.com; s=arc-20160816; b=BaUijU2iyPRmaWM5olybTY3FuAGSY3bGnzktrVdRy2BoIDkBRc9EV4PArOdzInX4oD zSRH1GTBbqk0m+WPV/O4swmt12OLPCEnPW1MFuAvJVVY5sqU+y1km5ikbiGsAGhkaFIK u2Xp3VrW4ScuWaf6RtBptqpOj7vJ+8MfyVlJRwkY7eLhe9wwnWztKvkk1LNdRs2kI54v 6BWQTrvBiiw6DA+sjZV0tHgIexcvIGOSu5mCsK8v9+twx37tpU1yO4jZhUl1eAn7jRUF nPCi87BAsLSmqeYVXxYtoXR+coy4ItSRvWR/Cg3xjkk7WmV/EPgRUqeyrssas7p577Ee tiEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=JyLSkDdQK2R52Uc0nMtMuUEGZY4WKRY9p258HffWIMY=; b=CkUSwIkIRXANjjd7tpbPkJVb/vxpyTl0xiqhO1TStB/kmKcsGBMZCxcVS3zpAICi38 oO5reRHFL5GcJ+v8vLRifY123f1RZtF9hYS753vED+u/C76sF1zHuDzveHUs9kf8G3Gg wJN8fbT3jamKXmvb3ads9dao6gDGpApR5TVw97UuJTDI/ufhb0iCx1RQO+OHcbQMkf3a 4XxpNeblk1aFS93M1roX/w4dxZxVaZVOZbcYGToodWj7wT9pA93sEcOw/ltQq+OsXWJ8 ARceXJsHKOXuwBBVfdgPjUaizLNGXYuDHOdJyJBxprDhVJCl/vVY38ESgyKsaMDSUH7N 14xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a63384a000000b00542d2508ac8si6521760pgn.89.2023.06.12.04.22.25; Mon, 12 Jun 2023 04:22:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232112AbjFLKxM (ORCPT + 99 others); Mon, 12 Jun 2023 06:53:12 -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> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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