mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
b9010f105f
commit
4405b632e3
|
@ -1237,6 +1237,9 @@ static int wil_rx_buff_mgmt_debugfs_show(struct seq_file *s, void *data)
|
||||||
int num_active;
|
int num_active;
|
||||||
int num_free;
|
int num_free;
|
||||||
|
|
||||||
|
if (!rbm->buff_arr)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
seq_printf(s, " size = %zu\n", rbm->size);
|
seq_printf(s, " size = %zu\n", rbm->size);
|
||||||
seq_printf(s, " free_list_empty_cnt = %lu\n",
|
seq_printf(s, " free_list_empty_cnt = %lu\n",
|
||||||
rbm->free_list_empty_cnt);
|
rbm->free_list_empty_cnt);
|
||||||
|
|
Loading…
Reference in New Issue