summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210
diff options
context:
space:
mode:
authorDedy Lansky <dlansky@codeaurora.org>2018-08-23 14:47:13 +0300
committerKalle Valo <kvalo@codeaurora.org>2018-08-28 16:49:15 +0300
commit4405b632e3da839defec966e4b0be44d0c5e3102 (patch)
tree774c1b7116791194bdd96cd5d1a4d33c69e4afea /drivers/net/wireless/ath/wil6210
parentb9010f105f21788b2dbe0e9599677a27247a9092 (diff)
downloadlwn-4405b632e3da839defec966e4b0be44d0c5e3102.tar.gz
lwn-4405b632e3da839defec966e4b0be44d0c5e3102.zip
wil6210: fix invalid memory access for rx_buff_mgmt debugfs
Check rx_buff_mgmt is allocated before accessing its internal fields. Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210')
-rw-r--r--drivers/net/wireless/ath/wil6210/debugfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index 6973333497c1..965c61be8b79 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -1237,6 +1237,9 @@ static int wil_rx_buff_mgmt_debugfs_show(struct seq_file *s, void *data)
int num_active;
int num_free;
+ if (!rbm->buff_arr)
+ return -EINVAL;
+
seq_printf(s, " size = %zu\n", rbm->size);
seq_printf(s, " free_list_empty_cnt = %lu\n",
rbm->free_list_empty_cnt);