Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4854cc33 authored by Dedy Lansky's avatar Dedy Lansky Committed by Lior David
Browse files

wil6210: fix invalid memory access for rx_buff_mgmt debugfs



Check rx_buff_mgmt is allocated before accessing its internal fields.

Change-Id: I73e2ab6844476d049c33b3b71fa9d175970552f4
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>
Git-commit: 4405b632e3da839defec966e4b0be44d0c5e3102
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarLior David <liord@codeaurora.org>
parent 8982eb71
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1226,6 +1226,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);