summaryrefslogtreecommitdiff
path: root/drivers/rmnet/shs/rmnet_shs_wq.c
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2019-11-29 16:35:09 -0700
committerSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2019-11-29 16:52:08 -0700
commitbe89ad02e5d82ec54a304c1e947ce66055fc59de (patch)
treef18553b1de378b261ab87ade889fedf518c36dc1 /drivers/rmnet/shs/rmnet_shs_wq.c
parent74ba58976f508d25ca187bf9fdaa1ec981745e72 (diff)
downloaddata-kernel-be89ad02e5d82ec54a304c1e947ce66055fc59de.tar.gz
drivers: shs: Protect all file system operations using shs ep lock
This add synchronization between the file system operations and the updates which occur within the shs workqueue. Fixes the following when there are two instances of userspace handlers running and are killed together- <6> Unable to handle kernel paging request at virtual address ffffffbfadadadb4 <2> pc : __free_pages+0x24/0xc0 <2> lr : free_pages+0x38/0x48 <2> Call trace: <2> __free_pages+0x24/0xc0 <2> free_pages+0x38/0x48 <2> rmnet_shs_release_caps+0x9c/0xb0 [rmnet_shs] <2> close_pdeo+0x94/0x120 <2> proc_reg_release+0x64/0x88 <2> __fput+0xdc/0x1d8 <2> ____fput+0x1c/0x28 <2> task_work_run+0x48/0xd0 <2> do_notify_resume+0x950/0x1160 <2> work_pending+0x8/0x14 CRs-fixed: 2576578 Change-Id: I67d1fc4d1f3c93d4497e988c2118c410091f0dd2 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'drivers/rmnet/shs/rmnet_shs_wq.c')
-rw-r--r--drivers/rmnet/shs/rmnet_shs_wq.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/rmnet/shs/rmnet_shs_wq.c b/drivers/rmnet/shs/rmnet_shs_wq.c
index 60653bf..4c69b57 100644
--- a/drivers/rmnet/shs/rmnet_shs_wq.c
+++ b/drivers/rmnet/shs/rmnet_shs_wq.c
@@ -2194,3 +2194,13 @@ u64 rmnet_shs_wq_get_max_allowed_pps(u16 cpu)
return rmnet_shs_cpu_rx_max_pps_thresh[cpu];
}
+
+void rmnet_shs_wq_ep_lock_bh(void)
+{
+ spin_lock_bh(&rmnet_shs_ep_lock);
+}
+
+void rmnet_shs_wq_ep_unlock_bh(void)
+{
+ spin_unlock_bh(&rmnet_shs_ep_lock);
+}