···924924925925 spin_lock_irqsave(&cnx->lock, flags);926926927927- if (! cnx->state & VETH_STATE_READY)927927+ if (! (cnx->state & VETH_STATE_READY))928928 goto drop;929929930930 if ((skb->len - 14) > VETH_MAX_MTU)···10221022 spin_lock_irqsave(&port->pending_gate, flags);1023102310241024 lpmask = veth_transmit_to_many(skb, lpmask, dev);10251025+10261026+ dev->trans_start = jiffies;1025102710261028 if (! lpmask) {10271029 dev_kfree_skb(skb);···1264126212651263 vlan = skb->data[9];12661264 dev = veth_dev[vlan];12671267- if (! dev)12681268- /* Some earlier versions of the driver sent12691269- broadcasts down all connections, even to12701270- lpars that weren't on the relevant vlan.12711271- So ignore packets belonging to a vlan we're12721272- not on. */12651265+ if (! dev) {12661266+ /*12671267+ * Some earlier versions of the driver sent12681268+ * broadcasts down all connections, even to lpars12691269+ * that weren't on the relevant vlan. So ignore12701270+ * packets belonging to a vlan we're not on.12711271+ * We can also be here if we receive packets while12721272+ * the driver is going down, because then dev is NULL.12731273+ */12741274+ dev_kfree_skb_irq(skb);12731275 continue;12761276+ }1274127712751278 port = (struct veth_port *)dev->priv;12761279 dest = *((u64 *) skb->data) & 0xFFFFFFFFFFFF0000;···13881381{13891382 int i;1390138313911391- vio_unregister_driver(&veth_driver);13841384+ /* Stop the queues first to stop any new packets being sent. */13851385+ for (i = 0; i < HVMAXARCHITECTEDVIRTUALLANS; i++)13861386+ if (veth_dev[i])13871387+ netif_stop_queue(veth_dev[i]);1392138813891389+ /* Stop the connections before we unregister the driver. This13901390+ * ensures there's no skbs lying around holding the device open. */13931391 for (i = 0; i < HVMAXARCHITECTEDLPS; ++i)13941392 veth_stop_connection(i);1395139313961394 HvLpEvent_unregisterHandler(HvLpEvent_Type_VirtualLan);1397139513981396 /* Hypervisor callbacks may have scheduled more work while we13991399- * were destroying connections. Now that we've disconnected from13971397+ * were stoping connections. Now that we've disconnected from14001398 * the hypervisor make sure everything's finished. */14011399 flush_scheduled_work();14001400+14011401+ vio_unregister_driver(&veth_driver);1402140214031403 for (i = 0; i < HVMAXARCHITECTEDLPS; ++i)14041404 veth_destroy_connection(i);