Message ID | 20221103222714.21566-1-Enrik.Berkhan@inka.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp30313wru; Thu, 3 Nov 2022 15:32:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64BlaLJL31MA79B2xxMyZlmeJptDw3bckU/d3WF3G2RoQOtD/jBNND3oE/SWcSVTrXrNvI X-Received: by 2002:a05:6a00:1823:b0:56b:f348:998f with SMTP id y35-20020a056a00182300b0056bf348998fmr32420336pfa.28.1667514737119; Thu, 03 Nov 2022 15:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667514737; cv=none; d=google.com; s=arc-20160816; b=CEQV29tWgO8lqYOyuuvT270XNbGzap3xQ1Elj8i//FvWIvF7yYeXq7FZ8vvjDQ1f68 xmyRPpXDHhkcxmzeQLCHnrArnY+pUY2ZLKsi+vEz2mqi3z/uaaxlOVL5SFBuQY5Nsysz mXADKuOT/Fbx2n0ZxYnG+NQZwtR+yjbMWHCcc0SLqmCd3GHUY6EhLIsRf14z2GBmUVAE lZ0dDqpxBaLINvRTMi+DAC0dvVbCO12F2E+cjhkrfAqhjBUj9KajSHfZzejm4N6G/8yb BMGfEiVF4kwNfK4IroRPtzM6+fYISnV4606QBvZGdk/Fj6QwQ9fjXBfpIjXpcd6rTKIz pFPg== 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 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.31.30; Thu, 03 Nov 2022 15:32:17 -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 <rfc822;yves.mi.zy@gmail.com> + 99 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <Enrik.Berkhan@inka.de>) id 1oqigH-005Ggn-9f; Thu, 03 Nov 2022 23:27:25 +0100 From: Enrik Berkhan <Enrik.Berkhan@inka.de> To: linux-input@vger.kernel.org Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Rishi Gupta <gupt21@gmail.com>, Enrik Berkhan <Enrik.Berkhan@inka.de> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748515932488514160?= X-GMAIL-MSGID: =?utf-8?q?1748515932488514160?= |
Series |
Fixes for the mcp2221 HID-to-I2C-bridge driver
|
|
Message
Enrik Berkhan
Nov. 3, 2022, 10:27 p.m. UTC
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