* [PATCH] tty: Move TIOCSTI toggle variable before kerndoc
@ 2022-11-07 3:46 Kees Cook
2022-11-07 4:58 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2022-11-07 3:46 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Kees Cook, Stephen Rothwell, Jiri Slaby, linux-kernel,
linux-hardening
The variable "tty_legacy_tiocsti" should be defined before the kerndoc
for the tiocsti() function. The new variable was breaking the "htmldocs"
build target:
drivers/tty/tty_io.c:2271: warning: cannot understand function prototype: 'bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI); '
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/lkml/20221107143434.66f7be35@canb.auug.org.au
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/tty/tty_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index a6a16cf986b7..24ebcb495145 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2255,6 +2255,7 @@ static int tty_fasync(int fd, struct file *filp, int on)
return retval;
}
+static bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI);
/**
* tiocsti - fake input character
* @tty: tty to fake input into
@@ -2268,7 +2269,6 @@ static int tty_fasync(int fd, struct file *filp, int on)
* * Called functions take tty_ldiscs_lock
* * current->signal->tty check is safe without locks
*/
-static bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI);
static int tiocsti(struct tty_struct *tty, char __user *p)
{
char ch, mbz = 0;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tty: Move TIOCSTI toggle variable before kerndoc
2022-11-07 3:46 [PATCH] tty: Move TIOCSTI toggle variable before kerndoc Kees Cook
@ 2022-11-07 4:58 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2022-11-07 4:58 UTC (permalink / raw)
To: Kees Cook, Greg Kroah-Hartman
Cc: Stephen Rothwell, Jiri Slaby, linux-kernel, linux-hardening
On 11/6/22 19:46, Kees Cook wrote:
> The variable "tty_legacy_tiocsti" should be defined before the kerndoc
> for the tiocsti() function. The new variable was breaking the "htmldocs"
> build target:
>
> drivers/tty/tty_io.c:2271: warning: cannot understand function prototype: 'bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI); '
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Link: https://lore.kernel.org/lkml/20221107143434.66f7be35@canb.auug.org.au
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> drivers/tty/tty_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index a6a16cf986b7..24ebcb495145 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -2255,6 +2255,7 @@ static int tty_fasync(int fd, struct file *filp, int on)
> return retval;
> }
>
> +static bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI);
> /**
> * tiocsti - fake input character
> * @tty: tty to fake input into
> @@ -2268,7 +2269,6 @@ static int tty_fasync(int fd, struct file *filp, int on)
> * * Called functions take tty_ldiscs_lock
> * * current->signal->tty check is safe without locks
> */
> -static bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI);
> static int tiocsti(struct tty_struct *tty, char __user *p)
> {
> char ch, mbz = 0;
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-07 4:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-07 3:46 [PATCH] tty: Move TIOCSTI toggle variable before kerndoc Kees Cook
2022-11-07 4:58 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox