* FAILED: patch "[PATCH] libceph: initialize CRUSH choose argument weights" failed to apply to 6.12-stable tree
@ 2026-11-07 10:26 Sasha Levin
2026-11-12 2:04 ` [PATCH 6.12.y] libceph: initialize CRUSH choose argument weights Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-11-07 10:26 UTC (permalink / raw)
To: zzyy19904204639, vega, weir, amarkuze, idryomov; +Cc: stable
The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x c3a995ff0782587789333c621e1f6bd5e574371e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '20261107052645-failed-6.12-c3a995ff0782@kernel.org' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From c3a995ff0782587789333c621e1f6bd5e574371e Mon Sep 17 00:00:00 2001
From: Darong Lu <zzyy19904204639@163.com>
Date: Mon, 28 Sep 2026 01:44:22 +0800
Subject: [PATCH] libceph: initialize CRUSH choose argument weights
Initialize the CRUSH choose argument weight-set array before decoding so
entries start in a defined state while the decoder fills them.
Cc: stable@vger.kernel.org
Fixes: 5cf9c4a9959b ("libceph, crush: per-pool crush_choose_arg_map for crush_do_rule()")
Reported-by: Vega <vega@nebusec.ai>
Assisted-by: LLM
Signed-off-by: Darong Lu <zzyy19904204639@163.com>
Signed-off-by: Ren Wei <weir@nebusec.ai>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
net/ceph/osdmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 7d65a81148166..e69a2249ddfbf 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -319,7 +319,7 @@ static int decode_choose_arg(void **p, void *end, struct crush_choose_arg *arg)
if (arg->weight_set_size) {
u32 i;
- arg->weight_set = kmalloc_objs(*arg->weight_set,
+ arg->weight_set = kzalloc_objs(*arg->weight_set,
arg->weight_set_size, GFP_NOIO);
if (!arg->weight_set)
return -ENOMEM;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 6.12.y] libceph: initialize CRUSH choose argument weights
2026-11-07 10:26 FAILED: patch "[PATCH] libceph: initialize CRUSH choose argument weights" failed to apply to 6.12-stable tree Sasha Levin
@ 2026-11-12 2:04 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-11-12 2:04 UTC (permalink / raw)
To: stable; +Cc: Darong Lu, Vega, Ren Wei, Alex Markuze, Ilya Dryomov, Sasha Levin
From: Darong Lu <zzyy19904204639@163.com>
[ Upstream commit c3a995ff0782587789333c621e1f6bd5e574371e ]
Initialize the CRUSH choose argument weight-set array before decoding so
entries start in a defined state while the decoder fills them.
Cc: stable@vger.kernel.org
Fixes: 5cf9c4a9959b ("libceph, crush: per-pool crush_choose_arg_map for crush_do_rule()")
Reported-by: Vega <vega@nebusec.ai>
Assisted-by: LLM
Signed-off-by: Darong Lu <zzyy19904204639@163.com>
Signed-off-by: Ren Wei <weir@nebusec.ai>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
[ sashal: replaced kzalloc_objs() with kcalloc() using an explicit element size ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/ceph/osdmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 803514a1bc7ce..fdb8c398f5ecd 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -320,7 +320,7 @@ static int decode_choose_arg(void **p, void *end, struct crush_choose_arg *arg)
if (arg->weight_set_size) {
u32 i;
- arg->weight_set = kmalloc_array(arg->weight_set_size,
+ arg->weight_set = kcalloc(arg->weight_set_size,
sizeof(*arg->weight_set),
GFP_NOIO);
if (!arg->weight_set)
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-12 2:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07 10:26 FAILED: patch "[PATCH] libceph: initialize CRUSH choose argument weights" failed to apply to 6.12-stable tree Sasha Levin
2026-11-12 2:04 ` [PATCH 6.12.y] libceph: initialize CRUSH choose argument weights Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox