BXE: catches potential PF
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 21 Jan 2015 17:08:44 +0000 (12:08 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 3 Feb 2015 15:12:29 +0000 (10:12 -0500)
I don't know if the mac count is the same as the number of m structs.

kern/drivers/net/bxe/bxe.c

index 9b7e8df..61dd98f 100644 (file)
@@ -12451,6 +12451,10 @@ bxe_init_mcast_macs_list(struct bxe_adapter                 *sc,
     }
 
     for(i=0; i< mc_count; i++) {
+               if (!m) {
+                       warn("Ran out of m's!");
+                       break;
+               }
         bcopy(m->addr, mc_mac->mac, ETH_ADDR_LEN);
         ECORE_LIST_PUSH_TAIL(&mc_mac->link, &p->mcast_list);