Эх сурвалжийг харах

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 жил өмнө
parent
commit
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) {
 		rsvp_nxt = _sde_rm_poll_get_rsvp_nxt_locked(rm, enc);
+		rsvp_cur = _sde_rm_get_rsvp_cur(rm, enc);
 		if (rsvp_nxt) {
 			pr_err("poll timeout cur %d nxt %d enc %d\n",
 				(rsvp_cur) ? rsvp_cur->seq : -1,