Re: [PATCH] nouveau/dmem: handle kcalloc() allocation failure

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

 



On Sun, Mar 3, 2024 at 4:46 AM Duoming Zhou <duoming@xxxxxxxxxx> wrote:
>
> The kcalloc() in nouveau_dmem_evict_chunk() will return null if
> the physical memory has run out. As a result, if we dereference
> src_pfns, dst_pfns or dma_addrs, the null pointer dereference bugs
> will happen.
>
> This patch uses stack variables to replace the kcalloc().

Won't this blow the stack?  And why not just test the return value of kcalloc?




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

  Powered by Linux