All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christian Heusel <christian@heusel.eu>
Cc: "Ned T. Crigler" <crigler@gmail.com>,
	Peter Seiderer <ps.report@gmx.net>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	regressions@lists.linux.dev, Jeff LaBundy <jeff@labundy.com>,
	Benjamin Tissoires <bentiss@kernel.org>
Subject: Re: [REGRESSION] disabling and re-enabling magic sysrq fails after kernel 6.11
Date: Mon, 4 Nov 2024 21:43:24 -0800	[thread overview]
Message-ID: <ZymwfKiniofjIAQY@google.com> (raw)
In-Reply-To: <dcde5b37-2ea7-472e-abe3-2cadc9d1e651@heusel.eu>

Hi Christian,

On Mon, Nov 04, 2024 at 01:06:40PM +0100, Christian Heusel wrote:
> On 24/10/27 10:30PM, Dmitry Torokhov wrote:
> > Hi everyone,
> > 
> > On Sun, Oct 27, 2024 at 10:02:24AM -0700, Ned T. Crigler wrote:
> > > Hi Peter, Christian,
> > > 
> > > On Sun, Oct 27, 2024 at 04:37:44PM +0100, Peter Seiderer wrote:
> > > > Hello Ned, Christian, *,
> > > > 
> > > > On Sun, 27 Oct 2024 15:06:09 +0100, Christian Heusel <christian@heusel.eu> wrote:
> > > > 
> > > > > On 24/10/26 07:15PM, Ned T. Crigler wrote:
> > > > > > Hi,
> > > > >
> > > > > Hey Ned,
> > > > >
> > > > > > It looks like starting with kernel 6.11, disabling and re-enabling
> > > > > > magic
> > > > > > sysrq fails with these errors in dmesg:
> > > > > >
> > > > > > kernel: input: input_handler_check_methods: only one event processing
> > > > > > method can be defined (sysrq)
> > > > > > kernel: sysrq: Failed to register input handler, error -22
> > > > > >
> > > > > > after doing:
> > > > > >
> > > > > > # echo 0 > /proc/sys/kernel/sysrq
> > > > > > # echo 438 > /proc/sys/kernel/sysrq
> > > > > > # echo 0 > /proc/sys/kernel/sysrq
> > > > > > # echo 438 > /proc/sys/kernel/sysrq
> > > > > > # echo 0 > /proc/sys/kernel/sysrq
> > > > > > # echo 438 > /proc/sys/kernel/sysrq
> > > > >
> > > > > I have found that this issue is also present in the latest mainline
> > > > > release and bisected it to the following commit:
> > > > >
> > > > >     d469647bafd9 ("Input: simplify event handling logic")
> > > > >
> > > > 
> > 
> > Yes, I did not consider that we might want to re-register the same input
> > handler, thank you for alerting me about the regression.
> > 
> > > > 
> > > > 
> > > > A quick fix/hack for the sysrq case:
> > > > 
> > > > --- a/drivers/tty/sysrq.c
> > > > +++ b/drivers/tty/sysrq.c
> > > > @@ -1045,7 +1045,7 @@ static inline void sysrq_register_handler(void)
> > > > <snip>
> 
> Thanks for the patch, are you looking to fix this in a more general way
> or do you plan on just sending in the above patch? (or did this already
> happen and I just missed it? :p)

I applied the patch that I proposed and Peter and Ned tested. I am not
sure about what you mean by fixing this in a more general way, could you
please elaborate?

Thanks.

-- 
Dmitry

      reply	other threads:[~2024-11-05  5:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-27  2:15 [REGRESSION] disabling and re-enabling magic sysrq fails after kernel 6.11 Ned T. Crigler
2024-10-27 14:06 ` Christian Heusel
2024-10-27 15:37   ` Peter Seiderer
2024-10-27 17:02     ` Ned T. Crigler
2024-10-28  5:30       ` Dmitry Torokhov
2024-10-28  8:38         ` Peter Seiderer
2024-10-29  0:58         ` Ned T. Crigler
2024-11-04 12:06         ` Christian Heusel
2024-11-05  5:43           ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZymwfKiniofjIAQY@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=christian@heusel.eu \
    --cc=crigler@gmail.com \
    --cc=jeff@labundy.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ps.report@gmx.net \
    --cc=regressions@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.