On Mon, Aug 19, 2024 at 10:54:59AM +0200, Christian Brauner wrote: > 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. Ah. You're right. When ->spare is zero it can't return error pointers. My bad. regards, dan carpenter