Skip to contentSkip to conversation

mm-damon-dbgfs-remove-a-unnecessary-variable.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 20, 2022

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/damon/dbgfs: remove an unnecessary variable
has been removed from the -mm tree. Its filename was
mm-damon-dbgfs-remove-a-unnecessary-variable.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: mm/damon/dbgfs: remove an unnecessary variable

Patch series "mm/damon: Hide unnecessary information disclosures".

DAMON is exposing some unnecessary information including kernel pointer in kernel log and tracepoint. This patchset hides such information. The first patch is only for a trivial cleanup, though.

This patch (of 4):

This commit removes a unnecessarily used variable in dbgfs_target_ids_write().

Fixes 4bc05954d007 ("mm/damon: implement a debugfs-based user space interface")

---

 mm/damon/dbgfs.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
mm/damon/dbgfs.c renamed from mm/damon/dbgfs.c~mm-damon-dbgfs-remove-a-unnecessary-variable +2 -3
@@ -364,7 +364,7 @@ static ssize_t dbgfs_target_ids_write(st
 	struct damon_ctx *ctx = file->private_data;
 	struct damon_target *t, *next_t;
 	bool id_is_pid = true;
-	char *kbuf, *nrs;
+	char *kbuf;
 	unsigned long *targets;
 	ssize_t nr_targets;
 	ssize_t ret;
@@ -374,14 +374,13 @@ static ssize_t dbgfs_target_ids_write(st
 	if (IS_ERR(kbuf))
 		return PTR_ERR(kbuf);
 
-	nrs = kbuf;
 	if (!strncmp(kbuf, "paddr\n", count)) {
 		id_is_pid = false;
 		/* target id is meaningless here, but we set it just for fun */
 		scnprintf(kbuf, count, "42    ");
 	}
 
-	targets = str_to_target_ids(nrs, count, &nr_targets);
+	targets = str_to_target_ids(kbuf, count, &nr_targets);
 	if (!targets) {
 		ret = -ENOMEM;
 		goto out;

_

Patches currently in -mm which might be from [email protected] are