RS: synchronize priv from kernel after swap
. make sure the priv id etc is maintained so future privctl talk about the right thing . solves broken IPC after update Change-Id: I17ed0212c22d634e6db1e80f8dcb2fb8bffe82c6
This commit is contained in:
parent
2867e60add
commit
8f4f859b35
1 changed files with 7 additions and 0 deletions
|
@ -266,6 +266,7 @@ int sys_upd_flags;
|
||||||
/* Swap slots here as well. */
|
/* Swap slots here as well. */
|
||||||
pid = src_rp->r_pid;
|
pid = src_rp->r_pid;
|
||||||
endpoint = src_rpub->endpoint;
|
endpoint = src_rpub->endpoint;
|
||||||
|
|
||||||
swap_slot(&src_rp, &dst_rp);
|
swap_slot(&src_rp, &dst_rp);
|
||||||
|
|
||||||
/* Reassign pids and endpoints. */
|
/* Reassign pids and endpoints. */
|
||||||
|
@ -276,6 +277,12 @@ int sys_upd_flags;
|
||||||
dst_rp->r_pub->endpoint = endpoint;
|
dst_rp->r_pub->endpoint = endpoint;
|
||||||
rproc_ptr[_ENDPOINT_P(dst_rp->r_pub->endpoint)] = dst_rp;
|
rproc_ptr[_ENDPOINT_P(dst_rp->r_pub->endpoint)] = dst_rp;
|
||||||
|
|
||||||
|
/* Update in-RS priv structs */
|
||||||
|
if ((r = sys_getpriv(&src_rp->r_priv, src_rp->r_pub->endpoint)) != OK)
|
||||||
|
panic("RS: update: could not update RS copies of priv of src: %d\n", r);
|
||||||
|
if ((r = sys_getpriv(&dst_rp->r_priv, dst_rp->r_pub->endpoint)) != OK)
|
||||||
|
panic("RS: update: could not update RS copies of priv of dst: %d\n", r);
|
||||||
|
|
||||||
/* Adjust input pointers. */
|
/* Adjust input pointers. */
|
||||||
*src_rpp = src_rp;
|
*src_rpp = src_rp;
|
||||||
*dst_rpp = dst_rp;
|
*dst_rpp = dst_rp;
|
||||||
|
|
Loading…
Reference in a new issue