Re: [bug report] fs: Allow statmount() in foreign mount namespace

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

 



On Sat, Aug 17, 2024 at 08:43:41PM GMT, Dan Carpenter wrote:
> Hello Christian Brauner,
> 
> Commit 71aacb4c8c3d ("fs: Allow statmount() in foreign mount

Hey Dan,

Thanks for the report.

> Should copy_mnt_id_req() ensure that kreq->mnt_ns_id is non-zero the same as
> ->mnt_id?

No, mnt_ns_id can legitimately be zero.

> 
>   5329          if (ret)
>   5330                  return ret;
>   5331  
>   5332          ns = grab_requested_mnt_ns(&kreq);
>   5333          if (!ns)
>   5334                  return -ENOENT;
> 
> The grab_requested_mnt_ns() function returns a mix of error pointers and NULL.

I'm not sure how you got that idea. If no mnt_ns_id is specified then
current's mnt_ns will be returned which is always valid. And if
mnt_ns_id is specified it'll return a valid mnt_ns or NULL.




[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