[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKPOu+8fGrCgzL6q0SA+WKesMTDEMWkOgTDb1AA_=GN4_k3abg@mail.gmail.com>
Date: Fri, 14 Feb 2025 14:08:24 +0100
From: Max Kellermann <max.kellermann@...os.com>
To: David Howells <dhowells@...hat.com>
Cc: Johannes Berg <johannes@...solutions.net>, netfs@...ts.linux.dev,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v6.13] fs/netfs/read_collect: fix crash due to
uninitialized `prev` variable
On Fri, Feb 14, 2025 at 2:03 PM David Howells <dhowells@...hat.com> wrote:
>
> Max Kellermann <max.kellermann@...os.com> wrote:
>
> > prev = list_prev_entry(subreq, rreq_link);
> > ...
> > + if (subreq->start == prev->start + prev->len) {
> > + prev = list_prev_entry(subreq, rreq_link);
>
> Actually, that doubles the setting of prev redundantly. It shouldn't hurt,
> but we might want to remove the inner one.
Oh right, that line shouldn't exist twice. (Previously, it was set too
late, after the variable had already been dereferenced.) I'll send v2
with only one copy.
Powered by blists - more mailing lists