Skip to content

Commit 8892a10

Browse files
committed
Merge: powerpc/64s: Fix VAS mm use after free
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7682 Description: powerpc/64s: Fix VAS mm use after free JIRA: https://issues.redhat.com/browse/RHEL-133781 Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=69625018 Tested: Verified Brew build test kernel RPMs and confirmed issue is resovled Signed-off-by: Mamatha Inamdar <minamdar@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Patrick Talbert <ptalbert@redhat.com>
2 parents e157633 + 6c9e610 commit 8892a10

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/powerpc/platforms/powernv/vas-window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,8 +1310,8 @@ int vas_win_close(struct vas_window *vwin)
13101310
/* if send window, drop reference to matching receive window */
13111311
if (window->tx_win) {
13121312
if (window->user_win) {
1313-
put_vas_user_win_ref(&vwin->task_ref);
13141313
mm_context_remove_vas_window(vwin->task_ref.mm);
1314+
put_vas_user_win_ref(&vwin->task_ref);
13151315
}
13161316
put_rx_win(window->rxwin);
13171317
}

arch/powerpc/platforms/pseries/vas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ static int vas_deallocate_window(struct vas_window *vwin)
540540
vascaps[win->win_type].nr_open_windows--;
541541
mutex_unlock(&vas_pseries_mutex);
542542

543-
put_vas_user_win_ref(&vwin->task_ref);
544543
mm_context_remove_vas_window(vwin->task_ref.mm);
544+
put_vas_user_win_ref(&vwin->task_ref);
545545

546546
kfree(win);
547547
return 0;

0 commit comments

Comments
 (0)