Skip to content
Commit 04aaca19 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Kroah-Hartman
Browse files

char: raw: do not leak CONFIG_MAX_RAW_DEVS to userspace



include/uapi/linux/raw.h leaks CONFIG_MAX_RAW_DEVS to userspace.

Userspace programs cannot use MAX_RAW_MINORS since CONFIG_MAX_RAW_DEVS
is not available anyway.

Remove the MAX_RAW_MINORS definition from the exported header, and use
CONFIG_MAX_RAW_DEVS in drivers/char/raw.c

While I was here, I converted printk(KERN_WARNING ...) to pr_warn(...)
and stretched the warning message.

Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20200617083313.183184-1-masahiroy@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 51d501e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment