Re: [PATCH] sysrq: export sysrq_mask symbol

From: Greg Kroah-Hartman
Date: Fri Apr 24 2020 - 05:04:42 EST


On Fri, Apr 24, 2020 at 10:53:46AM +0200, Paolo Pisati wrote:
> Commit "68af431 serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE" breaks
> the build if CONFIG_SERIAL_CORE=m:
>
> ...
> ERROR: modpost: "sysrq_mask" [drivers/tty/serial/serial_core.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> make: *** [Makefile:1331: modules] Error 2
>
> Signed-off-by: Paolo Pisati <paolo.pisati@xxxxxxxxxxxxx>
> ---
> drivers/tty/sysrq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index 5e0d0813da55..cf49010335fd 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -74,6 +74,7 @@ int sysrq_mask(void)
> return 1;
> return sysrq_enabled;
> }
> +EXPORT_SYMBOL(sysrq_mask);
>
> /*
> * A value of 1 means 'all', other nonzero values are an op mask:

Already in my tty tree, will go to Linus tomorrow, thanks!

greg k-h