mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
msm: camera: memmgr: update correct length in bufq
In a corner case, race condition to free the original ion buf allocated and new ion buffer with same fd but different size after freeing the origianl ion buf might result into mismatches in the real ion buf size assigned in bufq. To avoid this update length in bufq with local variable. CRs-Fixed: 3142221 Change-Id: I23d91445bd088bbde19ffa191e158256166f2053 Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
This commit is contained in:
parent
6639a3b50f
commit
a4b0246d27
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
|
@ -758,7 +759,7 @@ int cam_mem_mgr_alloc_and_map(struct cam_mem_mgr_alloc_cmd *cmd)
|
|||
tbl.bufq[idx].kmdvaddr = kvaddr;
|
||||
tbl.bufq[idx].vaddr = hw_vaddr;
|
||||
tbl.bufq[idx].dma_buf = dmabuf;
|
||||
tbl.bufq[idx].len = cmd->len;
|
||||
tbl.bufq[idx].len = len;
|
||||
tbl.bufq[idx].num_hdl = cmd->num_hdl;
|
||||
memcpy(tbl.bufq[idx].hdls, cmd->mmu_hdls,
|
||||
sizeof(int32_t) * cmd->num_hdl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue