Re: [ammarfaizi2-block:akpm/mm/mm-unstable 82/99] mm/mmap.c:516 vma_prepare() error: we previously assumed 'vp->vma' could be null (see line 505)

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

 



On Tue, Feb 28, 2023 at 06:28:36PM -0800, Suren Baghdasaryan wrote:
> On Tue, Feb 28, 2023 at 10:04 AM Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:
> >
> > On Tue, Feb 28, 2023 at 6:24 AM Dan Carpenter <error27@xxxxxxxxx> wrote:
> > >
> > > tree:   https://github.com/ammarfaizi2/linux-block akpm/mm/mm-unstable
> > > head:   61edd3b68c3185673c9b05dfe48038692964c73b
> > > commit: f517f7ae341d933856cdf4d9d773027681ed5dff [82/99] mm/mmap: write-lock VMAs in vma_prepare before modifying them
> > > config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20230228/202302281802.J93Nma7q-lkp@xxxxxxxxx/config)
> > > compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> > >
> > > If you fix the issue, kindly add following tag where applicable
> > > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > > | Reported-by: Dan Carpenter <error27@xxxxxxxxx>
> > > | Link: https://lore.kernel.org/r/202302281802.J93Nma7q-lkp@xxxxxxxxx/
> >
> > Thanks for reporting!
> >
> > >
> > > smatch warnings:
> > > mm/mmap.c:516 vma_prepare() error: we previously assumed 'vp->vma' could be null (see line 505)
> > >
> > > vim +516 mm/mmap.c
> > >
> > > 440703e082b9c7 Liam R. Howlett    2023-01-20  503  static inline void vma_prepare(struct vma_prepare *vp)
> > > 440703e082b9c7 Liam R. Howlett    2023-01-20  504  {
> > > f517f7ae341d93 Suren Baghdasaryan 2023-02-27 @505       if (vp->vma)
> > >
> > > Check presumes that vp->vma can be NULL.  On my other system (with
> > > yesterday's linux-next code) vp->vma can never be NULL.
> >
> > I think the check here is not needed since vp->vma should always be
> > non-NULL. I'll double-check and will remove it if that is confirmed.
> 
> Fix is posted at
> https://lore.kernel.org/all/20230301022720.1380780-1-surenb@xxxxxxxxxx/

Thanks!

regards,
dan carpenter





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux