msm: camera: sync: Handle dangling pointers in monitor dump

This change appropriately handles dangling pointer generated
by sync/dma/synx when closing the drivers.

CRs-Fixed: 3350863
Change-Id: Id5353814f4908f17706cebc04b3f02ccc1488813
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
Esse commit está contido em:
Haochen Yang
2023-03-03 17:40:58 -08:00
commit de Camera Software Integration
commit 28439b686e
3 arquivos alterados com 12 adições e 3 exclusões

Ver arquivo

@@ -2488,10 +2488,13 @@ static int cam_sync_close(struct file *filep)
}
if (sync_dev->mon_data) {
for (i = 0; i < CAM_SYNC_MONITOR_TABLE_SIZE; i++)
for (i = 0; i < CAM_SYNC_MONITOR_TABLE_SIZE; i++) {
kfree(sync_dev->mon_data[i]);
sync_dev->mon_data[i] = NULL;
}
}
kfree(sync_dev->mon_data);
sync_dev->mon_data = NULL;
}
/* Clean dma fence table */