소스 검색

disp: msm: sde: update rsvp_cur when poll is enabled for rsvp_nxt

This change updates rsvp_cur pointer to latest to avoid use
after free issues. rsvp_cur pointer can be freed in few cases due
to the unlock, wait and lock of rm_lock present in
_sde_rm_poll_get_rsvp_nxt_locked.

Change-Id: I389048188e8a615edc3e75dd1102d4ca8c74af65
Signed-off-by: Jayaprakash Madisetty <[email protected]>
Jayaprakash Madisetty 4 년 전
부모
커밋
0a56792383
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      msm/sde/sde_rm.c

+ 1 - 0
msm/sde/sde_rm.c

@@ -2548,6 +2548,7 @@ int sde_rm_reserve(
 	 */
 	 */
 	if (test_only && rsvp_nxt) {
 	if (test_only && rsvp_nxt) {
 		rsvp_nxt = _sde_rm_poll_get_rsvp_nxt_locked(rm, enc);
 		rsvp_nxt = _sde_rm_poll_get_rsvp_nxt_locked(rm, enc);
+		rsvp_cur = _sde_rm_get_rsvp_cur(rm, enc);
 		if (rsvp_nxt) {
 		if (rsvp_nxt) {
 			pr_err("poll timeout cur %d nxt %d enc %d\n",
 			pr_err("poll timeout cur %d nxt %d enc %d\n",
 				(rsvp_cur) ? rsvp_cur->seq : -1,
 				(rsvp_cur) ? rsvp_cur->seq : -1,