mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
amlvideo2: reduce vfq size to avoid mem out-of-bounds [1/1]
PD#SWPL-3355 Problem: vfq size large than kmalloc mem Solution: reduce vfq size to kmalloc mem size Verify: T962X-R311 Change-Id: Ibbc0c0219d6f170b4169d76e57419cdeb354f7fe Signed-off-by: Jiacheng Mei <jiacheng.mei@amlogic.com>
This commit is contained in:
committed by
Jianxin Pan
parent
cc667d68df
commit
eb0eede67b
@@ -3593,7 +3593,7 @@ static int amlvideo2_thread_tick(struct amlvideo2_fh *fh)
|
||||
|
||||
if ((node->video_blocking) && (node->amlvideo2_pool_ready != NULL)) {
|
||||
vfq_init(&node->q_ready,
|
||||
node->amlvideo2_pool_size + 1,
|
||||
node->amlvideo2_pool_size,
|
||||
(struct vframe_s **)&(node->amlvideo2_pool_ready[0]));
|
||||
node->video_blocking = false;
|
||||
node->tmp_vf = NULL;
|
||||
@@ -5748,7 +5748,7 @@ static int amlvideo2_receiver_event_fun(int type, void *data,
|
||||
case VFRAME_EVENT_PROVIDER_REG:
|
||||
node->video_blocking = false;
|
||||
vfq_init(&node->q_ready,
|
||||
node->amlvideo2_pool_size + 1,
|
||||
node->amlvideo2_pool_size,
|
||||
(struct vframe_s **)&(node->amlvideo2_pool_ready[0]));
|
||||
break;
|
||||
case VFRAME_EVENT_PROVIDER_UNREG:
|
||||
@@ -5884,7 +5884,7 @@ static int amlvideo2_create_node(struct platform_device *pdev, int node_id)
|
||||
}
|
||||
if (vid_node->amlvideo2_pool_ready != NULL) {
|
||||
vfq_init(&vid_node->q_ready,
|
||||
vid_node->amlvideo2_pool_size + 1,
|
||||
vid_node->amlvideo2_pool_size,
|
||||
(struct vframe_s **)&(vid_node->amlvideo2_pool_ready[0]));
|
||||
}
|
||||
vid_node->context = create_ge2d_work_queue();
|
||||
|
||||
Reference in New Issue
Block a user