Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a5f5c39 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram Committed by Jigarkumar Zala
Browse files

msm: camera: isp: Validate packet op-code while checking last flush req



Reject only update packets as part of config if it's request id is
less than last flush req id for that context.

Change-Id: Id5cc971cd23dd07463f767dc01277e8e1d805b99
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent ae8d33fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2235,7 +2235,8 @@ static int __cam_isp_ctx_config_dev_in_top_state(
	CAM_DBG(CAM_ISP, "Packet size 0x%x", packet->header.size);
	CAM_DBG(CAM_ISP, "packet op %d", packet->header.op_code);

	if (packet->header.request_id <= ctx->last_flush_req) {
	if ((((packet->header.op_code + 1) & 0xF) == CAM_ISP_PACKET_UPDATE_DEV)
		&& (packet->header.request_id <= ctx->last_flush_req)) {
		CAM_INFO(CAM_ISP,
			"request %lld has been flushed, reject packet",
			packet->header.request_id);