Patch "bpf: Fix tr dereferencing" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bpf: Fix tr dereferencing

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bpf-fix-tr-dereferencing.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0733325e29a8bb8af457e2bfcd7fbd2c95d87ee1
Author: Leon Hwang <hffilwlqm@xxxxxxxxx>
Date:   Sun Sep 17 23:38:46 2023 +0800

    bpf: Fix tr dereferencing
    
    [ Upstream commit b724a6418f1f853bcb39c8923bf14a50c7bdbd07 ]
    
    Fix 'tr' dereferencing bug when CONFIG_BPF_JIT is turned off.
    
    When CONFIG_BPF_JIT is turned off, 'bpf_trampoline_get()' returns NULL,
    which is same as the cases when CONFIG_BPF_JIT is turned on.
    
    Closes: https://lore.kernel.org/r/202309131936.5Nc8eUD0-lkp@xxxxxxxxx/
    Fixes: f7b12b6fea00 ("bpf: verifier: refactor check_attach_btf_id()")
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Leon Hwang <hffilwlqm@xxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20230917153846.88732-1-hffilwlqm@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index b010d45a1ecd5..8f4379e93ad49 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -725,7 +725,7 @@ static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog,
 static inline struct bpf_trampoline *bpf_trampoline_get(u64 key,
 							struct bpf_attach_target_info *tgt_info)
 {
-	return ERR_PTR(-EOPNOTSUPP);
+	return NULL;
 }
 static inline void bpf_trampoline_put(struct bpf_trampoline *tr) {}
 #define DEFINE_BPF_DISPATCHER(name)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux