Re: [PATCH V2] proc: Fix the issue of proc_mem_open returning NULL

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

 



On Mon, 24 Mar 2025 21:14:48 -0700 Penglei Jiang <superman.xpt@xxxxxxxxx> wrote:

> > >  if (IS_ERR(mm))
> > > -return mm == ERR_PTR(-ESRCH) ? NULL : mm;
> > > +return mm;
> > >
> > >  /* ensure this mm_struct can't be freed */
> > >  mmgrab(mm);
> > > --
> > > 2.17.1
> > >
> 
> Mateusz Guzik provides valuable suggestions.
> 
> Complete the missing NULL checks.

proc_mem_open() can return errno, NULL or mm_struct*.  It isn't obvious
why.

While you're in there can you please add documentation to
proc_mem_open() which explains its return values?




[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