Re: [PATCH] fs/pipe: use kvcalloc to allocate a pipe_buffer array

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

 



On 1/5/22 21:47, Andrei Vagin wrote:
> On Tue, Jan 4, 2022 at 10:54 PM Dmitry Safonov <0x7f454c46@xxxxxxxxx> wrote:
[..]
>> Otherwise this loop in free_pipe_info() may become lockup on some ugly
>> platforms with INTMAX allocation reachable, I think. I may be wrong :-)
> 
> This change looks reasonable, it makes types of local variables consistent
> with proper fields of pipe_inode_info. But right now, the maximum pipe size
> is limited by (1<<31) (look at round_pipe_size) and so we don't have a real
> issue here.

Right you are, I haven't noticed it.

Hmm,
:	if (size > (1U << 31))
:		return 0;

Isn't size == (1U << 31) a negative integer on 32-bit?

[probably, the question is not very related to your patch, though]

Thanks,
          Dmitry



[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