Actually I took a look at the aq_nic.c and it looks like there are still
places in the code that need patching to avoid UB. For example, from
your dmesg I see it pointing to this section of code
(https://github.com/torvalds/linux/blob/8d3a6c37d50d5a0504c126c932cc749e6dd9c78f/drivers/net/ethernet/aquantia/atlantic/aq_nic.c#L1267-L1269).

Which looks like this:


        for (i = 0U, aq_vec = self->aq_vec[0];
                self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
                aq_vec_stop(aq_vec);

And, to avoid UBSAN, should be rewritten as:


        for (i = 0U; self->aq_vecs > i; ++i) {
                aq_vec = self->aq_vec[i];
                aq_vec_stop(aq_vec);
        }

And, in fact, looks like there are another two places in that file that
require the same treatment.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1958770

Title:
  Aquantia GbE LAN driver causes UBSAN error during kernel boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to