Patch "bpf: helpers: fix bpf_wq_set_callback_impl signature" has been added to the 6.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: helpers: fix bpf_wq_set_callback_impl signature

to the 6.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-helpers-fix-bpf_wq_set_callback_impl-signature.patch
and it can be found in the queue-6.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 c32cdd3a9c3f0bdaba1ed6b13f2c5bd9b01adeae
Author: Benjamin Tissoires <bentiss@xxxxxxxxxx>
Date:   Mon Jul 8 11:52:57 2024 +0200

    bpf: helpers: fix bpf_wq_set_callback_impl signature
    
    [ Upstream commit f56f4d541eab1ae060a46b56dd6ec9130d6e3a98 ]
    
    I realized this while having a map containing both a struct bpf_timer and
    a struct bpf_wq: the third argument provided to the bpf_wq callback is
    not the struct bpf_wq pointer itself, but the pointer to the value in
    the map.
    
    Which means that the users need to double cast the provided "value" as
    this is not a struct bpf_wq *.
    
    This is a change of API, but there doesn't seem to be much users of bpf_wq
    right now, so we should be able to go with this right now.
    
    Fixes: 81f1d7a583fa ("bpf: wq: add bpf_wq_set_callback_impl")
    Signed-off-by: Benjamin Tissoires <bentiss@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240708-fix-wq-v2-1-667e5c9fbd99@xxxxxxxxxx
    Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index 3243c83ef3e39..7268370600f6e 100644
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -2786,7 +2786,7 @@ __bpf_kfunc int bpf_wq_start(struct bpf_wq *wq, unsigned int flags)
 }
 
 __bpf_kfunc int bpf_wq_set_callback_impl(struct bpf_wq *wq,
-					 int (callback_fn)(void *map, int *key, struct bpf_wq *wq),
+					 int (callback_fn)(void *map, int *key, void *value),
 					 unsigned int flags,
 					 void *aux__ign)
 {




[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