Patch "pmdomain: core: Use dev_name() instead of kobject_get_path() in debugfs" has been added to the 6.11-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

    pmdomain: core: Use dev_name() instead of kobject_get_path() in debugfs

to the 6.11-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:
     pmdomain-core-use-dev_name-instead-of-kobject_get_pa.patch
and it can be found in the queue-6.11 subdirectory.

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



commit 884c90a7c6f52651c57191d0290fbc741fb735f9
Author: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Date:   Mon May 27 16:25:53 2024 +0200

    pmdomain: core: Use dev_name() instead of kobject_get_path() in debugfs
    
    [ Upstream commit 9094e53ff5c86ebe372ad3960c3216c9817a1a04 ]
    
    Using kobject_get_path() means a dynamic memory allocation gets done, which
    doesn't work on a PREEMPT_RT based configuration while holding genpd's raw
    spinlock.
    
    To fix the problem, let's convert into using the simpler dev_name(). This
    means the information about the path doesn't get presented in debugfs, but
    hopefully this shouldn't be an issue.
    
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Tested-by: Raghavendra Kakarla <quic_rkakarla@xxxxxxxxxxx>  # qcm6490 with PREEMPT_RT set
    Acked-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240527142557.321610-4-ulf.hansson@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
index ca7f780582cf4..95b30d35e0b42 100644
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -3210,7 +3210,6 @@ static int genpd_summary_one(struct seq_file *s,
 		[GENPD_STATE_OFF] = "off"
 	};
 	struct pm_domain_data *pm_data;
-	const char *kobj_path;
 	struct gpd_link *link;
 	char state[16];
 	int ret;
@@ -3243,17 +3242,10 @@ static int genpd_summary_one(struct seq_file *s,
 	}
 
 	list_for_each_entry(pm_data, &genpd->dev_list, list_node) {
-		kobj_path = kobject_get_path(&pm_data->dev->kobj,
-				genpd_is_irq_safe(genpd) ?
-				GFP_ATOMIC : GFP_KERNEL);
-		if (kobj_path == NULL)
-			continue;
-
-		seq_printf(s, "\n    %-50s  ", kobj_path);
+		seq_printf(s, "\n    %-50s  ", dev_name(pm_data->dev));
 		rtpm_status_str(s, pm_data->dev);
 		perf_status_str(s, pm_data->dev);
 		mode_status_str(s, pm_data->dev);
-		kfree(kobj_path);
 	}
 
 	seq_puts(s, "\n");
@@ -3422,23 +3414,14 @@ static int devices_show(struct seq_file *s, void *data)
 {
 	struct generic_pm_domain *genpd = s->private;
 	struct pm_domain_data *pm_data;
-	const char *kobj_path;
 	int ret = 0;
 
 	ret = genpd_lock_interruptible(genpd);
 	if (ret)
 		return -ERESTARTSYS;
 
-	list_for_each_entry(pm_data, &genpd->dev_list, list_node) {
-		kobj_path = kobject_get_path(&pm_data->dev->kobj,
-				genpd_is_irq_safe(genpd) ?
-				GFP_ATOMIC : GFP_KERNEL);
-		if (kobj_path == NULL)
-			continue;
-
-		seq_printf(s, "%s\n", kobj_path);
-		kfree(kobj_path);
-	}
+	list_for_each_entry(pm_data, &genpd->dev_list, list_node)
+		seq_printf(s, "%s\n", dev_name(pm_data->dev));
 
 	genpd_unlock(genpd);
 	return ret;




[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