Linux-Next discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christian Brauner <brauner@kernel.org>,
	Yongxin Yang <yangyongxin@kylinos.cn>,
	linux-kernel@vger.kernel.org, linux-next@vger.kernel.org
Subject: [PATCH linux-next] profiling: keep the error message in the mm-nonmm-unstable merge
Date: Mon, 16 Nov 2026 16:42:19 -0500	[thread overview]
Message-ID: <20261116214219.470791-1-sashal@kernel.org> (raw)
In-Reply-To: <avsnCFn0jCvbhtRw@sirena.org.uk>

Commit 944b8062bc6f ("profiling: report it when /proc/profile can't be
created") in the vfs-brauner-fixes tree and commit 091be6dce28a
("perf/profile: report failure to create /proc/profile") in the
mm-nonmm-unstable tree both make create_proc_profile() return -ENOMEM
when proc_create() fails. The second one also prints an error, as the
return value of an initcall is not shown to anyone. The merge resolution
took the first version, so the message is gone.

Keep the pr_err().

Fixes: ac8dc2166a3c ("Merge branch 'mm-nonmm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm")
Link: https://lore.kernel.org/all/avsnCFn0jCvbhtRw@sirena.org.uk/
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
To be folded into the mm-nonmm-unstable merge, ac8dc2166a3c in next-20261116.

 kernel/profile.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/profile.c b/kernel/profile.c
index c6d5a2638a52e..818098cc094a5 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -245,8 +245,10 @@ int __ref create_proc_profile(void)
 		return 0;
 	entry = proc_create("profile", S_IWUSR | S_IRUGO,
 			    NULL, &profile_proc_ops);
-	if (!entry)
+	if (!entry) {
+		pr_err("profile: failed to create /proc/profile\n");
 		return -ENOMEM;
+	}
 	proc_set_size(entry, (1 + prof_len) * sizeof(atomic_t));
 	return 0;
 }

base-commit: 749a4de370409464cf8501ec5b2451df45c84eb4
-- 
2.53.0


  reply	other threads:[~2026-11-16 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 15:53 linux-next: manual merge of the mm-nonmm-unstable tree with the vfs-brauner-fixes tree Mark Brown
2026-11-16 21:42 ` Sasha Levin [this message]
2026-11-16 21:51   ` [PATCH linux-next] profiling: keep the error message in the mm-nonmm-unstable merge Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261116214219.470791-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=yangyongxin@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox