From 5ce18d9ae8a9c2566ac45ccb53067f61bf5e8ab7 Mon Sep 17 00:00:00 2001 From: Taniya Das Date: Thu, 12 Aug 2021 11:58:49 +0530 Subject: [PATCH 1/2] ANDROID: ABI: Update allowed list for QCOM Leaf changes summary: 2 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 2 Added functions: [A] 'function void clk_restore_context()' [A] 'function int clk_save_context()' Bug: 196793278 Change-Id: Ib944b947b781e9c8844978c85044220cc94dfedb Signed-off-by: Taniya Das --- android/abi_gki_aarch64.xml | 524 ++++++++++++++++++----------------- android/abi_gki_aarch64_qcom | 2 + 2 files changed, 268 insertions(+), 258 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index e2c8f6bd0fa6..43a4afd4ff9b 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -682,7 +682,9 @@ + + @@ -23582,7 +23584,7 @@ - + @@ -25855,7 +25857,7 @@ - + @@ -25875,7 +25877,7 @@ - + @@ -28585,7 +28587,7 @@ - + @@ -32002,7 +32004,7 @@ - + @@ -65243,6 +65245,12 @@ + + + + + + @@ -80881,7 +80889,7 @@ - + @@ -80953,7 +80961,7 @@ - + @@ -81026,7 +81034,7 @@ - + @@ -83273,7 +83281,7 @@ - + @@ -83345,7 +83353,7 @@ - + @@ -83390,7 +83398,7 @@ - + @@ -123930,10 +123938,6 @@ - - - - @@ -124398,6 +124402,10 @@ + + + + @@ -166187,7 +166195,7 @@ - + @@ -166195,7 +166203,7 @@ - + @@ -166217,7 +166225,7 @@ - + @@ -166237,7 +166245,7 @@ - + @@ -173389,7 +173397,7 @@ - + @@ -173553,7 +173561,7 @@ - + @@ -178940,6 +178948,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -178993,6 +179152,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -179007,24 +179251,6 @@ - - - - - - - - - - - - - - - - - - @@ -179127,29 +179353,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -179420,201 +179623,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -181210,7 +181218,7 @@ - + diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index a497f4b8433f..a84b0dcaaa0f 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -218,7 +218,9 @@ clk_prepare clk_put clk_register + clk_restore_context clk_round_rate + clk_save_context clk_set_parent clk_set_rate clk_sync_state From bf4d02ab1ecad898c38734f26b71ace90293c588 Mon Sep 17 00:00:00 2001 From: Nicolai Stange Date: Wed, 27 Jan 2021 14:34:43 +0100 Subject: [PATCH 2/2] UPSTREAM: io_uring: Fix current->fs handling in io_sq_wq_submit_work() No upstream commit, this is a fix to a stable 5.4 specific backport. The intention of backport commit cac68d12c531 ("io_uring: grab ->fs as part of async offload") as found in the stable 5.4 tree was to make io_sq_wq_submit_work() to switch the workqueue task's ->fs over to the submitting task's one during the IO operation. However, due to a small logic error, this change turned out to not have any actual effect. From a high level, the relevant code in io_sq_wq_submit_work() looks like old_fs_struct = current->fs; do { ... if (req->fs != current->fs && current->fs != old_fs_struct) { task_lock(current); if (req->fs) current->fs = req->fs; else current->fs = old_fs_struct; task_unlock(current); } ... } while (req); The if condition is supposed to cover the case that current->fs doesn't match what's needed for processing the request, but observe how it fails to ever evaluate to true due to the second clause: current->fs != old_fs_struct will be false in the first iteration as per the initialization of old_fs_struct and because this prevents current->fs from getting replaced, the same follows inductively for all subsequent iterations. Fix said if condition such that - if req->fs is set and doesn't match current->fs, the latter will be switched to the former - or if req->fs is unset, the switch back to the initial old_fs_struct will be made, if necessary. While at it, also correct the condition for the ->fs related cleanup right before the return of io_sq_wq_submit_work(): currently, old_fs_struct is restored only if it's non-NULL. It is always non-NULL though and thus, the if-condition is rendundant. Supposedly, the motivation had been to optimize and avoid switching current->fs back to the initial old_fs_struct in case it is found to have the desired value already. Make it so. Cc: stable@vger.kernel.org # v5.4 Fixes: cac68d12c531 ("io_uring: grab ->fs as part of async offload") Reviewed-by: Jens Axboe Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman (cherry picked from commit c4a23c852e80a3921f56c6fbc851a21c84a6d06b) Bug: 196948385 Signed-off-by: Alistair Delva Change-Id: Id4e7757ef2beaf58ac578bd9f09184085b3d0f5b --- fs/io_uring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 4127ea027a14..478df7e10767 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2226,7 +2226,8 @@ restart: /* Ensure we clear previously set non-block flag */ req->rw.ki_flags &= ~IOCB_NOWAIT; - if (req->fs != current->fs && current->fs != old_fs_struct) { + if ((req->fs && req->fs != current->fs) || + (!req->fs && current->fs != old_fs_struct)) { task_lock(current); if (req->fs) current->fs = req->fs; @@ -2351,7 +2352,7 @@ out: mmput(cur_mm); } revert_creds(old_cred); - if (old_fs_struct) { + if (old_fs_struct != current->fs) { task_lock(current); current->fs = old_fs_struct; task_unlock(current);