diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-09-10 13:49:53 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-09-10 13:49:53 +0200 |
commit | 2f7eedca6cecbfad52d5b52c1550066d9252c947 (patch) | |
tree | ffce8be3ceee2c845a951d11b99578ca468639a4 /kernel/bpf/btf.c | |
parent | treewide: Fix wrong singular form of jiffies in comments (diff) | |
parent | Linux 6.11-rc7 (diff) | |
download | linux-2f7eedca6cecbfad52d5b52c1550066d9252c947.tar.xz linux-2f7eedca6cecbfad52d5b52c1550066d9252c947.zip |
Merge branch 'linus' into timers/core
To update with the latest fixes.
Diffstat (limited to 'kernel/bpf/btf.c')
-rw-r--r-- | kernel/bpf/btf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 520f49f422fe..a4e4f8d43ecf 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -823,9 +823,11 @@ static bool btf_name_valid_section(const struct btf *btf, u32 offset) const char *src = btf_str_by_offset(btf, offset); const char *src_limit; + if (!*src) + return false; + /* set a limit on identifier length */ src_limit = src + KSYM_NAME_LEN; - src++; while (*src && src < src_limit) { if (!isprint(*src)) return false; @@ -6283,7 +6285,7 @@ static struct btf *btf_parse_module(const char *module_name, const void *data, errout: btf_verifier_env_free(env); - if (base_btf != vmlinux_btf) + if (!IS_ERR(base_btf) && base_btf != vmlinux_btf) btf_free(base_btf); if (btf) { kvfree(btf->data); |