From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>, Aaron Tomlin <atomlin@atomlin.com>
Subject: Re: [PATCH 5.10.y] mips: sched: Fix CPUMASK_OFFSTACK memory corruption
Date: Sun, 26 Jul 2026 08:04:55 -0400 [thread overview]
Message-ID: <20260725192000.stable-0016@kernel.org> (raw)
In-Reply-To: <20260723181719.540786-1-atomlin@atomlin.com>
> Fix this by allocating new_mask first. To handle variable-sized user
> masks correctly, use cpumask_size() to truncate overly large user masks
> or pad undersized masks with zeros before copying the data directly into
> the allocated buffer.
The allocation move looks right, but the '!p' error path is off: it
keeps "return -ESRCH;" and appends an unreachable "goto out_free_new_mask;"
after it. Since new_mask is now allocated at the top of the function,
that path leaks new_mask, and the trailing goto is dead code. Upstream
(and the already-queued 5.15 backport) convert it to
"retval = -ESRCH; goto out_free_new_mask;" instead. Could you fix that
and resend a v2? Thanks.
--
Thanks,
Sasha
next prev parent reply other threads:[~2026-07-26 12:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 14:28 FAILED: patch "[PATCH] mips: sched: Fix CPUMASK_OFFSTACK memory corruption" failed to apply to 5.10-stable tree gregkh
2026-07-20 14:39 ` Aaron Tomlin
2026-07-23 18:17 ` [PATCH 5.10.y] mips: sched: Fix CPUMASK_OFFSTACK memory corruption Aaron Tomlin
2026-07-26 12:04 ` Sasha Levin [this message]
2026-08-16 0:20 ` Aaron Tomlin
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=20260725192000.stable-0016@kernel.org \
--to=sashal@kernel.org \
--cc=atomlin@atomlin.com \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).