Patch "sched_ext: fix application of sizeof to pointer" has been added to the 6.12-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

    sched_ext: fix application of sizeof to pointer

to the 6.12-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:
     sched_ext-fix-application-of-sizeof-to-pointer.patch
and it can be found in the queue-6.12 subdirectory.

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



commit 5ea1d14064be96f46f15f54568e6c0ad961882bd
Author: guanjing <guanjing@xxxxxxxxxxxxxxxxxxxx>
Date:   Sun Nov 17 10:51:29 2024 +0800

    sched_ext: fix application of sizeof to pointer
    
    [ Upstream commit f24d192985cbd6782850fdbb3839039da2f0ee76 ]
    
    sizeof when applied to a pointer typed expression gives the size of
    the pointer.
    
    The proper fix in this particular case is to code sizeof(*cpuset)
    instead of sizeof(cpuset).
    
    This issue was detected with the help of Coccinelle.
    
    Fixes: 22a920209ab6 ("sched_ext: Implement tickless support")
    Signed-off-by: guanjing <guanjing@xxxxxxxxxxxxxxxxxxxx>
    Acked-by: Andrea Righi <arighi@xxxxxxxxxx>
    Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/sched_ext/scx_central.c b/tools/sched_ext/scx_central.c
index 21deea320bd7..e938156ed0a0 100644
--- a/tools/sched_ext/scx_central.c
+++ b/tools/sched_ext/scx_central.c
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
 	SCX_BUG_ON(!cpuset, "Failed to allocate cpuset");
 	CPU_ZERO(cpuset);
 	CPU_SET(skel->rodata->central_cpu, cpuset);
-	SCX_BUG_ON(sched_setaffinity(0, sizeof(cpuset), cpuset),
+	SCX_BUG_ON(sched_setaffinity(0, sizeof(*cpuset), cpuset),
 		   "Failed to affinitize to central CPU %d (max %d)",
 		   skel->rodata->central_cpu, skel->rodata->nr_cpu_ids - 1);
 	CPU_FREE(cpuset);




[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