Patch "mm/damon/sysfs: eliminate potential uninitialized variable warning" has been added to the 6.6-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

    mm/damon/sysfs: eliminate potential uninitialized variable warning

to the 6.6-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:
     mm-damon-sysfs-eliminate-potential-uninitialized-var.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 9a438222e62d83c0a75c4085dbd2f92abac07737
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Mon Nov 6 17:07:40 2023 +0300

    mm/damon/sysfs: eliminate potential uninitialized variable warning
    
    [ Upstream commit 85c2ceaafbd306814a3a4740bf4d95ac26a8b36a ]
    
    The "err" variable is not initialized if damon_target_has_pid(ctx) is
    false and sys_target->regions->nr is zero.
    
    Link: https://lkml.kernel.org/r/739e6aaf-a634-4e33-98a8-16546379ec9f@moroto.mountain
    Fixes: 0bcd216c4741 ("mm/damon/sysfs: update monitoring target regions for online input commit")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index faaef5098e264..b317f51dcc987 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -1172,7 +1172,7 @@ static int damon_sysfs_update_target(struct damon_target *target,
 		struct damon_ctx *ctx,
 		struct damon_sysfs_target *sys_target)
 {
-	int err;
+	int err = 0;
 
 	if (damon_target_has_pid(ctx)) {
 		err = damon_sysfs_update_target_pid(target, sys_target->pid);




[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