summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorManjunathappa Prakash <prakashpm@codeaurora.org>2017-10-19 23:30:24 -0700
committersnandini <snandini@codeaurora.org>2017-10-25 13:41:05 -0700
commit26207605032e242b947385eb541d3e47f4686081 (patch)
treed04b4a34e8c9be677dfb7cde30c582188887d4de /utils
parenta8cff1d78636a5a4983301d329272bab35ebe145 (diff)
downloadqca-wfi-host-cmn-26207605032e242b947385eb541d3e47f4686081.tar.gz
qcacmn: 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: 2131044
Diffstat (limited to 'utils')
-rw-r--r--utils/pktlog/linux_ac.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/pktlog/linux_ac.c b/utils/pktlog/linux_ac.c
index 47f2abf95..2854de58b 100644
--- a/utils/pktlog/linux_ac.c
+++ b/utils/pktlog/linux_ac.c
@@ -573,8 +573,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;
}
@@ -639,8 +639,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;
}
@@ -860,8 +860,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;
}
@@ -1094,8 +1094,8 @@ static int __pktlog_mmap(struct file *file, struct vm_area_struct *vma)
return -ENOMEM;
}
- 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;
}