From: Alistair Delva <adelva@google.com>
To: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
"Jakub Kicinski" <kuba@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
kernel-team@android.com, "Maciej Żenczykowski" <maze@google.com>,
"Steffen Klassert" <steffen.klassert@secunet.com>
Subject: [PATCH] xfrm/compat: Remove use of kmalloc_track_caller
Date: Sun, 1 Nov 2020 14:08:45 -0800 [thread overview]
Message-ID: <20201101220845.2391858-1-adelva@google.com> (raw)
The __kmalloc_track_caller symbol is not exported if SLUB/SLOB are
enabled instead of SLAB, which breaks the build on such configs when
CONFIG_XFRM_USER_COMPAT=m.
ERROR: "__kmalloc_track_caller" [net/xfrm/xfrm_compat.ko] undefined!
Other users of this symbol are 'bool' options, but changing this to
bool would require XFRM_USER to be built in as well, which doesn't
seem worth it. Go back to kmalloc().
Fixes: 96392ee5a13b9 ("xfrm/compat: Translate 32-bit user_policy from sockptr")
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Alistair Delva <adelva@google.com>
---
net/xfrm/xfrm_compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c
index e28f0c9ecd6a..c1dee0696dfb 100644
--- a/net/xfrm/xfrm_compat.c
+++ b/net/xfrm/xfrm_compat.c
@@ -585,7 +585,7 @@ static int xfrm_user_policy_compat(u8 **pdata32, int optlen)
if (optlen < sizeof(*p))
return -EINVAL;
- data64 = kmalloc_track_caller(optlen + 4, GFP_USER | __GFP_NOWARN);
+ data64 = kmalloc(optlen + 4, GFP_USER | __GFP_NOWARN);
if (!data64)
return -ENOMEM;
--
2.29.1.341.ge80a0c044ae-goog
next reply other threads:[~2020-11-01 22:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 22:08 Alistair Delva [this message]
2020-11-01 23:34 ` [PATCH] xfrm/compat: Remove use of kmalloc_track_caller Dmitry Safonov
2020-11-02 3:38 ` Herbert Xu
2020-11-02 4:08 ` Alistair Delva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201101220845.2391858-1-adelva@google.com \
--to=adelva@google.com \
--cc=0x7f454c46@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kernel-team@android.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).