diff options
author | Praveen Kurapati <pkurapat@codeaurora.org> | 2019-02-18 12:38:39 +0530 |
---|---|---|
committer | Praveen Kurapati <pkurapat@codeaurora.org> | 2019-02-25 18:50:06 +0530 |
commit | da1c3cc5ca3665c12d7917f6f26d62e006f7f420 (patch) | |
tree | 27ec829825b9acce4c09aea49eab46186213f4fb /drivers | |
parent | ace476d5d234e54233d8f0d2d54823fb55bba0b5 (diff) |
msm: ipa3: Release the IPA lock acquired
In ipa3_rest_rt we are returning from it without unlocking
the lock acquired leading to deadlock issue. Added code to
release the lock acquired.
Change-Id: I9ab6919c6c2f881a580848a578c9429921e92f08
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/msm/ipa/ipa_v2/ipa_rt.c | 4 | ||||
-rw-r--r-- | drivers/platform/msm/ipa/ipa_v3/ipa_rt.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c b/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c index 4fea1255b360..af8d9dcf8afc 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c +++ b/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1404,6 +1404,7 @@ int ipa2_reset_rt(enum ipa_ip_type ip, bool user_only) hdr_entry->cookie != IPA_HDR_COOKIE) { IPAERR_RL( "Header already deleted\n"); + mutex_unlock(&ipa_ctx->lock); return -EINVAL; } } else if (rule->proc_ctx) { @@ -1415,6 +1416,7 @@ int ipa2_reset_rt(enum ipa_ip_type ip, bool user_only) IPA_PROC_HDR_COOKIE) { IPAERR_RL( "Proc entry already deleted\n"); + mutex_unlock(&ipa_ctx->lock); return -EINVAL; } } diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c index 256843022dfe..659d38e90108 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1548,6 +1548,7 @@ int ipa3_reset_rt(enum ipa_ip_type ip, bool user_only) hdr_entry->cookie != IPA_HDR_COOKIE) { IPAERR_RL( "Header already deleted\n"); + mutex_unlock(&ipa3_ctx->lock); return -EINVAL; } } else if (rule->proc_ctx) { @@ -1559,6 +1560,7 @@ int ipa3_reset_rt(enum ipa_ip_type ip, bool user_only) IPA_PROC_HDR_COOKIE) { IPAERR_RL( "Proc entry already deleted\n"); + mutex_unlock(&ipa3_ctx->lock); return -EINVAL; } } |