diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-06-17 11:33:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-10 15:50:51 +0300 |
commit | 04aaca197f16aff608e19ee98b1e55f535d746be (patch) | |
tree | 92de1d3fc0964c264c03fe882c4198f8c2f822f6 /include/uapi/linux/raw.h | |
parent | 51d501e540e6edd6737c0f1383b7789232595c13 (diff) | |
download | linux-04aaca197f16aff608e19ee98b1e55f535d746be.tar.xz |
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: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20200617083313.183184-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/raw.h')
-rw-r--r-- | include/uapi/linux/raw.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/uapi/linux/raw.h b/include/uapi/linux/raw.h index dc96dda479d6..47874919d0b9 100644 --- a/include/uapi/linux/raw.h +++ b/include/uapi/linux/raw.h @@ -14,6 +14,4 @@ struct raw_config_request __u64 block_minor; }; -#define MAX_RAW_MINORS CONFIG_MAX_RAW_DEVS - #endif /* __LINUX_RAW_H */ |