Re: [PATCH 1/2] pipe: fix potential use-after-free in pipe_read()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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())



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux