On Tue, Jun 11, 2024 at 11:12:18AM -0400, Steven Rostedt wrote: > On Tue, 11 Jun 2024 14:40:29 +0000 > Wei Yang <richard.weiyang@xxxxxxxxx> wrote: > > > >+ > > >+ align = memparse(p+1, &p); > > >+ if (*p != ':') > > >+ return -EINVAL; > > >+ > > > > Make sure command line parameters are valid before doing the allocation. > > You mean that size is non zero? > > I don't know if we care what the align is. Zero is valid. memblock won't like zero align, it should be SMP_CACHE_BYTES at least. No point requiring it from user, just update the alignment if the user passed zero. > > >+ start = memblock_phys_alloc(size, align); > > >+ if (!start) > > >+ return -ENOMEM; > > >+ -- Sincerely yours, Mike.