Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2305454rwi; Thu, 3 Nov 2022 15:32:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TpAFuBSigVyggXDye5fXfLc8iDyyNEozJ9yjjiknadfAfDSntMQWVyGIv7PuSJZ4rRjaV X-Received: by 2002:a17:90a:d901:b0:213:dc98:8b0d with SMTP id c1-20020a17090ad90100b00213dc988b0dmr25492949pjv.11.1667514776994; Thu, 03 Nov 2022 15:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667514776; cv=none; d=google.com; s=arc-20160816; b=XYRaNbFaGB8koC97S8VwLqS5gNpMCImWWHMa9Hww4P75m+k9VYAbSucMgPu1yYpfXo C0Ng44yYZUt5TGjiQ2tQDVfVFZ7QFZyYkBr3sIpzsyYJ9Y7wE1J2T6ndyDIOXTm+ec5O Vw5g90L20n+Pv80B27sB0xrAVOmPBHUNrJ5MuBegKugwGan/GPOfHe8k3SG5L15q8lND 1pg3IwrhugIvLWbLP8EhxpCNJ67yNqKesmXrVaxj8hObVCot8wPDVArRuUV0wegzp1NA gV1dqCn8xuzecubqXQ+KrMwxAoYq9t5aDTDXDHCREG7bBtQVwtjyueLsrh0fZ0usnANb Cw2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BQqJAECfEHXYVVPpIxdyfGwBiX4nbhVumIEITL3yv/s=; b=OWEDUfQXoa5wThWO+42i5MSGMBMaOmXXCoTOH3jfNVtfSKqH8WJ1Z53xnSQee3PpQJ E63ta4bKQcl8WKpQryUr3YVfAgMTkM8fdwOSniFzw80vdjnWAjApM2aLylJAb+1hNzG/ PsltVnc/bixKTIOkbgVquiVd2JQyGfMgBoxJYIaSPGERkG/9iP5DR+7tt7LIIQ9tFvwd hYS00Qw5QxdeSOgQfZ6SmdyPwEhqKi6pEK/MjRxjopDlWAk4DdBr+o+dftOHTT0Xbxvl 2698rtzphdJcG/OLO/uOYNpREo5djcwqXqQXCxP/j6/X7T4FK0epk813ThjqecZn8UoA +ChA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170902d54600b0018686834315si2095245plf.431.2022.11.03.15.32.43; Thu, 03 Nov 2022 15:32:56 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231719AbiKCW1c (ORCPT + 98 others); Thu, 3 Nov 2022 18:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231559AbiKCW13 (ORCPT ); Thu, 3 Nov 2022 18:27:29 -0400 Received: from mail.inka.de (mail.inka.de [IPv6:2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C30D21802; Thu, 3 Nov 2022 15:27:27 -0700 (PDT) Received: from mail3.berkhan-weisser.de ([2a03:4000:54:b9a::4]) by mail.inka.de with esmtpsa id 1oqigH-005aIb-O6; Thu, 03 Nov 2022 23:27:25 +0100 Received: from 127.0.0.1 (helo=localhost.localdomain) by mail3.berkhan-weisser.de with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1oqigH-005Ggn-9f; Thu, 03 Nov 2022 23:27:25 +0100 From: Enrik Berkhan To: linux-input@vger.kernel.org Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Rishi Gupta , Enrik Berkhan Subject: [PATCH v2 0/3] Fixes for the mcp2221 HID-to-I2C-bridge driver Date: Thu, 3 Nov 2022 23:27:11 +0100 Message-Id: <20221103222714.21566-1-Enrik.Berkhan@inka.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220926202239.16379-1-Enrik.Berkhan@inka.de> References: <20220926202239.16379-1-Enrik.Berkhan@inka.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 In this patch series are fixes for issues I found during recent tests of an MCP2221 board. - you can confuse the kernel driver when using the chip from user mode via /dev/hidrawX, typically leading to a NULL pointer dereference in the driver's HID raw event handler - the driver needs > 15s to initialize because the HID raw handling is not enabled during initialization of the GPIO part - the rxbuf pointer can become invalid or even stale if the device would send unsolicited reports Changes in v2: - removed: data shared with the bottom half code is not protected from concurrent access Feedback if this is actually needed or not would be appreciated. - rebased on linux-hid/for-6.2/mcp2221 Enrik Berkhan (3): HID: mcp2221: don't connect hidraw HID: mcp2221: enable HID I/O during GPIO probe HID: mcp2221: avoid stale rxbuf pointer drivers/hid/hid-mcp2221.c | 51 +++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 10 deletions(-) base-commit: 3d74c9eca1a2bda03e45f18d13154ac3e0dfba85 -- 2.34.1