[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YZJbBNs/63pnXngK@casper.infradead.org>
Date: Mon, 15 Nov 2021 13:05:08 +0000
From: Matthew Wilcox <willy@...radead.org>
To: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
David Howells <dhowells@...hat.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] pipe: fix potential use-after-free in pipe_read()
On Mon, Nov 15, 2021 at 02:13:44PM +0800, Leizhen (ThunderTown) wrote:
>
>
> On 2021/11/15 12:25, Matthew Wilcox wrote:
> > On Mon, Nov 15, 2021 at 11:57:20AM +0800, Zhen Lei wrote:
> >> if (!buf->len) {
> >> + unsigned int __maybe_unused flags = buf->flags;
> >
> > Why __maybe_unused?
>
> It's used only if "#ifdef CONFIG_WATCH_QUEUE". Otherwise, a warning will be reported.
Better to turn the #ifdef into if (IS_ENABLED())
Powered by blists - more mailing lists