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

Commit 035271ee authored by Sanjay Singh's avatar Sanjay Singh Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: ignore processing responses in invalid state



No need to process response messages from video hardware
after device went into invalid state. Processing responses
may result in use-after-free memory fault because client
might free all the resources after error.
Change-Id: Ia2c22a2740466e6368e61437aa4246927150858b
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
Signed-off-by: default avatarSanjay Singh <sisanj@codeaurora.org>
parent 8f25c5b6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3645,6 +3645,12 @@ static void venus_hfi_core_work_handler(struct work_struct *work)
		i < num_responses; ++i) {
		struct msm_vidc_cb_info *r = &device->response_pkt[i];

		if (!__core_in_valid_state(device)) {
			dprintk(VIDC_ERR,
				"Ignore responses from %d to %d as device is in invalid state",
				(i + 1), num_responses);
			break;
		}
		device->callback(r->response_type, &r->response);
	}