I have successfully modified two of the mentioned three functions and tested the module, so far UBSAN does not complain anymore :)
Unfdortunately I can't rewrite the third function, since it does not match the pattern (and I have no idea what I'm doing)
for (tc = 0U; tc < self->aq_nic_cfg.tcs; tc++) { for (i = 0U, aq_vec = self->aq_vec[0]; aq_vec && self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) { data += count; count = aq_vec_get_sw_stats(aq_vec, tc, data); } }
I have included a diff for the other two functions.
I have successfully modified two of the mentioned three functions and tested the module, so far UBSAN does not complain anymore :)
Unfdortunately I can't rewrite the third function, since it does not match the pattern (and I have no idea what I'm doing)
for (tc = 0U; tc < self->aq_ nic_cfg. tcs; tc++) { get_sw_ stats(aq_ vec, tc, data);
for (i = 0U, aq_vec = self->aq_vec[0];
aq_vec && self->aq_vecs > i;
++i, aq_vec = self->aq_vec[i]) {
data += count;
count = aq_vec_
}
}
I have included a diff for the other two functions.