Re: [PATCH] fs: make d_path-like functions all have unsigned size

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

 



On Tue, Jul 27, 2021 at 04:07:47PM +0100, Matthew Wilcox wrote:

> umm ... what if someone passes in -ENOMEM as buflen?  Not saying we
> have such a path right now, but I could imagine it happening.
> 
> 	if (unlikely(buflen < 0))
> 		return ERR_PTR(buflen);
> 	if (unlikely(buflen > 0x8000)) {
> 		buf += buflen - 0x8000;
> 		buflen = 0x8000;
> 	}

Not really.  You don't want ERR_PTR() of random negative numbers to start
flying around...



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

  Powered by Linux