From: Greg KH <gregkh@linuxfoundation.org>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Cc: stable@vger.kernel.org, MPTCP Upstream <mptcp@lists.linux.dev>,
Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH 5.10.y] mptcp: fix sometimes-uninitialized warning
Date: Tue, 1 Oct 2024 10:15:34 +0200 [thread overview]
Message-ID: <2024100124-conflict-tipped-f0b8@gregkh> (raw)
In-Reply-To: <20240930162345.3938790-2-matttbe@kernel.org>
On Mon, Sep 30, 2024 at 06:23:46PM +0200, Matthieu Baerts (NGI0) wrote:
> Nathan reported this issue:
>
> $ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 LLVM_IAS=1 mrproper allmodconfig net/mptcp/subflow.o
> net/mptcp/subflow.c:877:6: warning: variable 'incr' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> 877 | if (WARN_ON_ONCE(offset > skb->len))
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/asm-generic/bug.h:101:33: note: expanded from macro 'WARN_ON_ONCE'
> 101 | #define WARN_ON_ONCE(condition) ({ \
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 102 | int __ret_warn_on = !!(condition); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 103 | if (unlikely(__ret_warn_on)) \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 104 | __WARN_FLAGS(BUGFLAG_ONCE | \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 105 | BUGFLAG_TAINT(TAINT_WARN)); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 106 | unlikely(__ret_warn_on); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 107 | })
> | ~~
> net/mptcp/subflow.c:893:6: note: uninitialized use occurs here
> 893 | if (incr)
> | ^~~~
> net/mptcp/subflow.c:877:2: note: remove the 'if' if its condition is always false
> 877 | if (WARN_ON_ONCE(offset > skb->len))
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 878 | goto out;
> | ~~~~~~~~
> net/mptcp/subflow.c:874:18: note: initialize the variable 'incr' to silence this warning
> 874 | u32 offset, incr, avail_len;
> | ^
> | = 0
> 1 warning generated.
>
> As mentioned by Nathan, this issue is present because 5.10 does not
> include commit ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling"),
> which removed the use of 'incr' in the error path added by this change.
> This other commit does not really look suitable for stable, hence this
> dedicated patch for 5.10.
>
> Fixes: e93fa44f0714 ("mptcp: fix duplicate data handling")
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/20240928175524.GA1713144@thelio-3990X
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> net/mptcp/subflow.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Now applied, thanks!
greg k-h
next prev parent reply other threads:[~2024-10-01 8:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 16:23 [PATCH 5.10.y] mptcp: fix sometimes-uninitialized warning Matthieu Baerts (NGI0)
2024-09-30 17:28 ` MPTCP CI
2024-10-01 8:15 ` Greg KH [this message]
2024-10-01 8:20 ` Patch "mptcp: fix sometimes-uninitialized warning" has been added to the 5.10-stable tree gregkh
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=2024100124-conflict-tipped-f0b8@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=nathan@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.