From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B95D2EB84E for ; Thu, 10 Sep 2026 15:11:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789053073; cv=none; b=W2hdQo/rHVHg+AVgmyrbSRe6+Vb77JIgB4AKqFqar8FMWAyULhnQDA1uwOjQuuC+9d80j7wPQR8ekMHEUdITix0nRFxvhefFZqTMR/xyERayvIQ7bFPYfgBdXKSMtf7jqcgiYQZdk9zSMMXslKQzXQ+T3xl+WZbHlO8eoz0CEu8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789053073; c=relaxed/simple; bh=0IwZ3Y1WwFrucPlKuvYGPUYBTW50SSA6+yQ0+IBChx4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ra8Jz2Xcmpb4S64N1BemHf6ShuHs/xYeAksTQqY38PCf6c5+nfh21Z6NI7OfCXHdDSinFZOLC6JJ2yUXHVlkvLXOGak3KEbo7tD0+a2ZlR7d9KNyFi4L8OkIL0GRbobYCmZJ1wharn0HwdTDypnMzONSybFi6GuQ0gwvh+xKABE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=antnArkB; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="antnArkB" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-49954b88fffso53148815e9.0 for ; Thu, 10 Sep 2026 08:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789053062; x=1789657862; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Yv1xn+5CR2S+k3dv2u6er/HbqF0X0NfGBoB7jTRkQS0=; b=antnArkBErCt9ftbNXqRR9h0AOZZWlC0gllMd5qla+UPjSkh14wbO4tLvFbN8uVh2Z Iso2NPvG0ewT1p5uoJXRikyBLg+3MgpLmagfaq0mBK7jIWipx3Uj6vGFAA4xGnSpYR0C /bDrefOAI3IOqecKzkURHCZMswmwRfJp7ErrqsOhXLRAlA8LxdXA71B/e28tNgxlQDPC sFYczMVLiX1WVSclGWQI/KGncipT/IENHSEKFCnbSdRKqsK+du7Ho2rzhmoq9XhygE5k VZlhiWxLOGyYduk1f6BWVqz2wM3yiaonYuH2panANQBpvU7GmWvWXdr+V50JhucgraIN 7X0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789053062; x=1789657862; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Yv1xn+5CR2S+k3dv2u6er/HbqF0X0NfGBoB7jTRkQS0=; b=WSoOzgwZSOnP9tGaHUObuofhIbyDXQJUqxlI5eYJFgysw0zmS7a84j9SAp/aBxMbA4 FjJlSdDYO+gRQBbzbUKt3FvO6EpP1WWn3uVy7m8XWmSlHLaen5g7OfHF1RfMPo5R5FFO xYL1zabovLfNx/nKmAh2gv2J4W8XuHPBhVudQ77Esg0mpxpU6ywcGReY63bryEr2fxCV QKxu6bjnIgey40pxokvGY3vk3zTCobkgBGZTTCDjhcaOqcrvfKi/uxaz6ullqr71nbSh lR8v1OCDg6bX1eW3tA6T06XWHTn4+4nuayd2YcNKgHPDN7uPr/RTO6883NbG9iM+/lDY 3/gw== X-Forwarded-Encrypted: i=1; AKwUvBzM3T7BGjBYWDYnWc61BO6+kChM1IdIzCkVjhBgF7NlHov/kc08Ohf9sSD9+sgky+4CBwEJqXXiAsz9xM0=@vger.kernel.org X-Gm-Message-State: AFuF++mDjaenNoJ1L6ukqDxWpz5M6ltL0tdBXuKJmL3A0MoKI+HFQILd AmrKwC7nuP4AEsUAFL1CB+24HJ2uxal77crlF7fE+r4jinz1REGi3qaV X-Gm-Gg: AYBFou2TFYbEgBWpgox+34qVDryI6q3UKfO53Gxbj7i8ObPLvuOkiiCgzQrU8rlQRPX G+Rzlb4EpByDYbdznwlYScPhQnl/+UGxOxkbu2Y1PWFDnzANy6a7kRYFnCN0TsbS8qUB/QfJZ3V IrUnmHF7eKdnqTAW/JlS3MOh9oBx4BEJdNqb3wXXZWMy7fVfIYIyXGZrEFRsLyeWmd5cR4zxlXZ UVsBUE2alGwEbKaFS8ZyU4/SD3RtvaYvZYNUrXBRPDHFlPiwedK41ncPEfI+iHwv0Vy3fh0MVgC qxAYL6UcE4OY9iaabqb9pP1BDYhzGWvlG+QNqu2NvLc845eC8iwQ6fiPkW4Ir6PxC/ZN+RGqpRq yygvVWYP6xkR2PkXFUuSy/eiLlKmTs6uuFeEQymgrNUhRB1htSUHo28yWeQrMsQ0MqBaxEe5oDf cCWNuqql5I2LHRcFqIQtptvUY24Ck1H8myZcv+FLQm8PHXcii79Y6KQ1ygajPFAT7FiE6HVYL+Z aSqL/XVxFso6uZf7iqRGRB3zlTBtWyy9pJdCOc= X-Received: by 2002:a05:600c:474a:b0:49c:e42b:a4ac with SMTP id 5b1f17b1804b1-49cf823f60amr379250595e9.11.1789053061780; Thu, 10 Sep 2026 08:11:01 -0700 (PDT) Received: from localhost.localdomain (mob-31-26-70-91.net.vodafone.it. [31.26.70.91]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-49d1fd532dcsm123568545e9.1.2026.09.10.08.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2026 08:11:01 -0700 (PDT) From: Oleg Keri To: "Derek J. Clark" , Mark Pearson , Jiri Kosina , Benjamin Tissoires , Hans de Goede , Bernhard Seibold Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] HID: lenovo: two ordering fixes in remove() and tpkbd probe Date: Thu, 10 Sep 2026 17:10:49 +0200 Message-ID: <20260910151051.12975-1-okerixx@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Two long-standing ordering bugs in hid-lenovo, both pointed out by the Sashiko review of an unrelated patch of mine [1]. Neither is specific to any recent change; the first dates from 2020, the second from the original 2012 trackpoint keyboard driver. Patch 1: lenovo_remove() cancels the tablet keyboards' fn_lock_sync_work while the hardware is still delivering the events that re-queue it, so a key press in that window leaves the work pending across the devres free of its data. Stop the hardware before the per-model teardown. Patch 2: lenovo_probe_tpkbd() exposes sysfs attributes before allocating the drvdata they dereference. Allocate first. Compile-tested only: I have neither a ThinkPad 10 Ultrabook Keyboard nor a ThinkPad USB Keyboard with TrackPoint. Both changes are pure reorderings of existing calls. [1] https://lore.kernel.org/all/20260910064345.9BF1E1F000FF@smtp.kernel.org/ Oleg Keri (2): HID: lenovo: stop the hardware before the per-model teardown HID: lenovo: allocate the trackpoint drvdata before exposing its sysfs attributes drivers/hid/hid-lenovo.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) -- 2.55.0 base-commit: df2908090cda368b01ff43709f51890076c56157