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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
51d501e540
commit
04aaca197f
@@ -14,6 +14,4 @@ struct raw_config_request
|
||||
__u64 block_minor;
|
||||
};
|
||||
|
||||
#define MAX_RAW_MINORS CONFIG_MAX_RAW_DEVS
|
||||
|
||||
#endif /* __LINUX_RAW_H */
|
||||
|
Reference in New Issue
Block a user