Re: [REGRESSION] disabling and re-enabling magic sysrq fails after kernel 6.11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux