summaryrefslogtreecommitdiff
path: root/core/utils
diff options
context:
space:
mode:
authorManjunathappa Prakash <prakashpm@codeaurora.org>2017-07-25 17:52:52 -0700
committersnandini <snandini@codeaurora.org>2017-08-09 14:37:02 -0700
commitceebeade7f6dbf16629ab6bac81371ec0ebbf27d (patch)
tree82123fa99af31b1c623561ad2a7c9bed553d5701 /core/utils
parentd1035f741aa35b1d70c92d5d1f0d768555af0a45 (diff)
qcacld-3.0: Add protection for pkt_log ops with module stop
Packet log ops are protected against load-unload and SSR, but not against module stop. Take care to add check for module stop. Also takecare to NULLing of wdi_event_list and NULL check before accessing. Change-Id: I20d49ff587719fc14f60a53e86092383de6ef5b8 CRs-Fixed: 2082135
Diffstat (limited to 'core/utils')
-rw-r--r--core/utils/pktlog/linux_ac.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/utils/pktlog/linux_ac.c b/core/utils/pktlog/linux_ac.c
index e707932dc27d..e510d7547400 100644
--- a/core/utils/pktlog/linux_ac.c
+++ b/core/utils/pktlog/linux_ac.c
@@ -572,8 +572,8 @@ static int __pktlog_open(struct inode *i, struct file *f)
return -EBUSY;
}
- if (cds_is_load_or_unload_in_progress() || cds_is_driver_recovering()) {
- pr_info("%s: Load/Unload or recovery is in progress", __func__);
+ if (cds_is_module_state_transitioning()) {
+ pr_info("%s: module transition in progress", __func__);
return -EAGAIN;
}
@@ -638,8 +638,8 @@ static int __pktlog_release(struct inode *i, struct file *f)
if (!pl_info)
return -EINVAL;
- if (cds_is_load_or_unload_in_progress() || cds_is_driver_recovering()) {
- pr_info("%s: Load/Unload or recovery is in progress", __func__);
+ if (cds_is_module_state_transitioning()) {
+ pr_info("%s: module transition in progress", __func__);
return -EAGAIN;
}
@@ -859,8 +859,8 @@ __pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
struct ath_pktlog_info *pl_info;
struct ath_pktlog_buf *log_buf;
- if (cds_is_load_or_unload_in_progress() || cds_is_driver_recovering()) {
- pr_info("%s: Load/Unload or recovery is in progress", __func__);
+ if (cds_is_module_state_transitioning()) {
+ pr_info("%s: module transition in progress", __func__);
return -EAGAIN;
}