mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 08:56:45 +07:00
[media] media: vb2: add __GFP_NOWARN to dma-sg allocator
Add __GFP_NOWARN parameter to videobuf2 dma-sg allocator to prevent kernel warning and stack dump if there is not enough memory available. Videobuf2 and drivers should correctly handle no memory case, so there is no need for stack dump and extensive log. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
9a7b2d1f0e
commit
a52a82fc3a
@ -62,7 +62,7 @@ static void *vb2_dma_sg_alloc(void *alloc_ctx, unsigned long size)
|
||||
goto fail_pages_array_alloc;
|
||||
|
||||
for (i = 0; i < buf->sg_desc.num_pages; ++i) {
|
||||
buf->pages[i] = alloc_page(GFP_KERNEL | __GFP_ZERO);
|
||||
buf->pages[i] = alloc_page(GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN);
|
||||
if (NULL == buf->pages[i])
|
||||
goto fail_pages_alloc;
|
||||
sg_set_page(&buf->sg_desc.sglist[i],
|
||||
|
Loading…
Reference in New Issue
Block a user