soc: qcom: dcc_v2: Fix slab-out-of-bounds issue in dcc driver
The link list number should use nr_link_list of driver data instead of DCC_MAX_LINK_LIST. Change-Id: Iaf42c4e6ee6ea29bf8b4bea6ffb64a4b2354fcfd Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
This commit is contained in:
parent
a8c0cf4945
commit
57a0e96e09
@ -612,7 +612,7 @@ static bool is_dcc_enabled(struct dcc_drvdata *drvdata)
|
||||
bool dcc_enable = false;
|
||||
int list;
|
||||
|
||||
for (list = 0; list < DCC_MAX_LINK_LIST; list++) {
|
||||
for (list = 0; list < drvdata->nr_link_list; list++) {
|
||||
if (drvdata->enable[list]) {
|
||||
dcc_enable = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user