From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.177 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796199515; b=Zfd9j9kD7aL+QSrQ2YTMMDXN6b6hC5J/skUdpGGAVzIARXrivLT9veWpdX38G6epPmL+ KfDsv2MK/1dtfY/zGJnyBZp/qiC8BkHZooTuWJRLlO/sbb7yItUcBeND4WU8OtLsSlcCk SMewzqZsvnitRyiwXrv02zbk31d4N3HHvQvZySRrOz6MZng9e2Wfq34j3d02v+vCayr0i 8fscVzvAeuDrq7KyLsswRusbW+MS81mgUzrPRF51AF4rbLoMyq7hgUeOBW8DTbCC+UnBS WLT03a7k6Xv7fBzOcXKfAZhUeDq0ZhzQEhC0YNNkomVCCAZPTXICN4JnbAhdzmD4wFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796199515; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:From:To:Cc:Subject:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=BEwgJka/P0zTsXx5QtSLXWMW6NFjTjy/9/zl10wbWFU=; b=e4zKrCVO0mgPkWlKma62fFd7ckdPw+XFz8xN5WD1TbfKBXM4ByN2BC6z4dGFocGsd2pC y8hLzvB/6Lk7X1El8qlfjSlwMkQB/ZykYYM8MMTF1OReFDvIMf8+OovQtd6YFYMyfv3p6 VCPUl0NsQrkBNiUAlYvdm76AtE0VnJRyFPXg+tpSUC6QjmXvTLGCDD3OSrlAe7w/P+RqS 0+pVawaopNdLLdRGadU9j0yZJAU3JZ5TvYBuLZrEiZhoHfNM8xGe4WILzbDFtdFsd9YPD I7KSZJqGdiACMlU/HNyX+e1+mKFlwWPleSvnwc8WMiZJnwuCoprVJfDrn6T6lKm7FRA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=asu.edu; spf=pass smtp.mailfrom=asu.edu; dkim=pass header.d=asu.edu header.i=@asu.edu header.a=rsa-sha256 header.s=google header.b=cmXkKDt4; arc=none smtp.remote-ip=74.125.82.177 Received: from mail-dy1-f177.google.com (mail-dy1-f177.google.com [74.125.82.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89488606A31A for ; Wed, 2 Dec 2026 08:18:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 89488606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=asu.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=asu.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=asu.edu header.i=@asu.edu header.a=rsa-sha256 header.s=google header.b=cmXkKDt4 Received: by mail-dy1-f177.google.com with SMTP id 5a478bee46e88-386c337edfeso1572705eec.1 for ; Wed, 02 Dec 2026 00:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu.edu; s=google; t=1796199514; x=1796804314; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:content-type:subject:cc:to :from:date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=BEwgJka/P0zTsXx5QtSLXWMW6NFjTjy/9/zl10wbWFU=; b=cmXkKDt4fweUMgN1cWViwT1RumLbnsh1GjgSBV4nNje3RkS450FTh4kcgY3BE46Wmp nSO8f9BZLwvoztfxYk9Qguob1QwMjlsMTzg3a9ehETC+pNQxM6bD+ffUzMiUPROAIJEE RA+LT9PjTH6r3FvpUTjFpQ6IuGnfD0KGOHyUbDC0nmuWkCiMIWFdkF2wAZ0i1605PXxS PeZa8LBt/xAYCUunbd0i2ZdSW7PQnc+KvjPS24EY4GfZorzjh7JeKa9mh2Rrj+oLKTMQ Hm09K92oBa1V1XEod+VYAYKEMTBeuxs3CIpJJ++MBum2K/p85JhOAD3v5tByTTkoNDWw pJ8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796199514; x=1796804314; h=mime-version:content-transfer-encoding:content-type:subject:cc:to :from:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=BEwgJka/P0zTsXx5QtSLXWMW6NFjTjy/9/zl10wbWFU=; b=R6VUIGyESHPf4Xn2wFkA2xGueOUmPqpnMoXzmJwU2M7Hqgd+LbVOsYPZoLiKB7oSdO rIv7gOCXjth3dcga7Lq1kSw47STOejUkhv2cOdygwgk78BeFoVVjDOJKbpb6YQErK5Zv f8H9OcR1ndjtqBGuvtHQVrdvmiW0lxDkTFXW4YQwS/sss0E62Ov/XidtmdfkPmCFeTOc 0c4CoGWMGfiZ3oBfwixdUuZYm2XIpJPhQ5iZqrFTD0BzO8pF2hKk27FxRMAgI4UMXdfi A83kg85XF5hPW2P5O+plL9tzvDplPb8lLS7PT+qeUzYJ1dzqwIbyw66O2s1xC6CEjFvV s1Pw== X-Forwarded-Encrypted: i=1; AL+hErG8v52vrGVa8NkA7VUT0EmCvwjYwHkDCuefPWWmAZ5enj7bXlhGRRjgtW757YxYOA5q9tDqeymjbude0w==@vger.kernel.org X-Gm-Message-State: APuU4Z8VOzteVknjsywYzAcVguijpM7w2opJZTQKH5kmG5JSxlhvCtV4 72pWiQb4b638/nPQ0tSV91UwLcV+Zozu2kUKpMv6cnQqTWe28T/aKrhmGaFU1ZNHVA== X-Gm-Gg: AZFdTZca0hFX6+qzRxtTVHrH3488LtFVZyUofvgIebMlJcPhPM1zGPK0CadeXcyyccO jdj7+xnUMYPiQmYFJ8xBHaMmd+KsUsdcb6VBnLw8fyja05KLww5pyBvuKMJeV+5SNOofjgjruI6 S2C2fdd+oRyZvRCU3pCATqM01awQSCfA1p6H8YGI4jcHiBAoWAWFtP/aPNmeM8/3/nq5rB0Z1cI 6yRzjsCKWZerapxHTXrePuBvSgcU9FsvtroGYkyGSpaI3jNbKzwrbD+fNa6qRQLqgDxTqbmplXQ R+fUbJkBs81SasTprjRcQu/vR/Rf4KWXU7huxkI5j0utsrD/rvjTR66LbGg2QMq1aQ7XhiM0QdK P6WO8uDA3qkn/ct7h1sT56paM+7tHkecNuabv5t8nn7t8Un3Xuw+2LrmewYdIOkFFyn/3sYYTgr 3mp31QttOlX1ATNeAaI+CyyhLOVRVo252vdOxNjB8U8JCatCIMjl3RUcgRZVbhT/wYPu+1IDIC6 oC2rwMmZICt6MtB5XhR4sms0FM9lfYl1KSsNkjV3hOpTA6NNQAI09FbC94yvVzQG4hN7bEdHb7L 9UJxKuo3cK5x34e8QrA= X-Received: by 2002:a05:7301:1a08:b0:386:a698:6755 with SMTP id 5a478bee46e88-386a69868cbmr48817680eec.0.1796199513386; Wed, 02 Dec 2026 00:18:33 -0800 (PST) Received: from 06-sysrq-toggle-double-register.eml ([2607:fb91:4185:7cd1:cb94:a89d:255b:5c40]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-385666e7fc3sm103400831eec.8.2026.12.02.00.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 00:18:32 -0800 (PST) Message-ID: <6b0fd458.e5646aef.135df4.76b7@mx.google.com> Date: Wed, 02 Dec 2026 00:18:32 -0800 (PST) From: Rahul Priolkar To: Greg Kroah-Hartman , Jiri Slaby Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org Subject: [BUG] tty: sysrq: duplicate input handler registration on v7.4-rc5 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Hello, On Linux v7.4-rc5 (fe6ff8d5d675), we observed duplicate entries for the SysRq input handler on a defconfig-based x86_64 guest. In each trial, we updated kernel.sysrq and checked /proc/bus/input/handlers for exactly one SysRq entry. With concurrent updates, the handler appeared 60 times in one listing after 98 trials. Updating kernel.sysrq requires root in the initial user namespace. Our reading of drivers/tty/sysrq.c is that sysrq_toggle_support() can register the static handler twice because the enable-state check and registration are not serialized. Does that match your understanding of the failure? A debug build with DEBUG_LIST and BUG_ON_DATA_CORRUPTION stopped in the first run. The relevant frames were: kernel BUG at lib/list_debug.c:37! RIP: 0010:__list_add_valid_or_report input_register_handler sysrq_register_handler sysrq_sysctl_handler On the unmodified kernel, we ran the updates one at a time as a control. All 3,000 trials showed exactly one handler entry. We then tested an rc5 build that included a mutex around sysrq_toggle_support() along with our other candidate fixes. Across 6,000 concurrent-update trials, we saw no duplicate entries or kernel warnings. I can share the candidate patch if useful. Thanks, Rahul Priolkar