export: fix string handling of namespace in EXPORT_SYMBOL_NS
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 09:04:42 +0000 (11:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:06 +0000 (18:36 +0200)
commitb3983b1042e4ccbe46b958c793ff53cfcff49529
tree67669ed022221a2a442182ba6e5c6f11c2fae386
parentcbf9172eb657d36140188acf55238cd630cd0f3c
export: fix string handling of namespace in EXPORT_SYMBOL_NS

[ Upstream commit d143b9db8069f0e2a0fa34484e806a55a0dd4855 ]

Commit c3a6cf19e695 ("export: avoid code duplication in
include/linux/export.h") broke the ability for a defined string to be
used as a namespace value.  Fix this up by using stringify to properly
encode the namespace name.

Fixes: c3a6cf19e695 ("export: avoid code duplication in include/linux/export.h")
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Cc: Matthias Maennich <maennich@google.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20220427090442.2105905-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/export.h