Commit 8cad5d80 authored by Dedy Lansky's avatar Dedy Lansky Committed by Greg Kroah-Hartman

wil6210: fix invalid memory access for rx_buff_mgmt debugfs

[ Upstream commit 4405b632 ]

Check rx_buff_mgmt is allocated before accessing its internal fields.
Signed-off-by: default avatarDedy Lansky <dlansky@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bcaabaa7
......@@ -1263,6 +1263,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment